Thursday, June 21, 2012

Monitoring HAFileAdapter

if a file has already been processed but not purged from the FILEADAPTER_IN table,
the second time it's submitted you will see

INSERT INTO FILEADAPTER_IN (FULL_PATH, ROOT_DIRECTORY,FILE_DIRECTORY, FILE_NAME, FILE_ENDPOINT_GUID, FILE_LAST_MODIFIED,FILE_READONLY, CREATED, UPDATED, FILE_PROCESSED) VALUES (?,?,?,?,?,?,?,?,?,?)

where FILE_PROCESSED = "0"

and you will get a

java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (PL1_SOAINFRA.SYS_C0026314) violated

because the file is already in the DB.

So why the file is not being purged? Because it's still with FILE_PROCESSED = "0".

I see very often:

DELETE FROM FILEADAPTER_IN WHERE FILE_PROCESSED='2' AND FILE_READONLY='N' AND ROOT_DIRECTORY=?)


RECOVER_UNPICKED:

DELETE FROM FILEADAPTER_IN WHERE UPDATED <= ? AND FILE_PROCESSED='0' AND ROOT_DIRECTORY=?

where the first ? is:
System.currentTimeMillis() - (oracle.tip.adapter.file.timeout.recoverunpicked.minutes * 60 * 1000)

(default is 3600 000 = 1 hour)

and in the log:
FileListDAO::Recovered [0] unpicked instances diff time=[1340299775855], recoverytime=[120000]


and also

DELETE FROM FILEADAPTER_IN WHERE UPDATED <= ? AND FILE_PROCESSED='1' AND ROOT_DIRECTORY=?)

where the first ? is:
System.currentTimeMillis() - (oracle.tip.adapter.file.timeout.recoverpicked.minutes * 60 * 1000)


and also

DELETE FROM FILEADAPTER_IN WHERE FILE_ENDPOINT_GUID= ? AND FILE_READONLY='N' AND FILE_PROCESSED='0'

No comments: