Checking For Consistency Checks

Hello,

I have a COM (VB6) agent that runs on schedule against a Notes database. I am using a hidden view with a very specific SELECT statement to hold the documents that the agent needs to act upon. The agent sweeps the view, it finds any documents in the view and updates them. Then it stamps them processed, which by the view’s SELECT statement should move it out. It all works fine - mostly.

Occassionally, the agent runs on a set of documents, then runs on them again 10 minutes later - as if they never moved from the view. However audit history and log entries are indicating that the agent ran succesfully and updated them successfully the first run.

Both times this has happened it was after a prolonged period of inactivity, such as first thing in the AM after a whole night of inactivity. Notes was open on the machine the whole time.

Is it possible that if the agent acts after a long period it could trigger a consistency check or something that might prevent the indexes from updating? Is there any way I can programmatically check to see if a consistency check is being performed from the agent?

Thanks in advance for any ideas.

Subject: Checking For Consistency Checks

I don’t think a consistency check is the cause of your problem, but you could send a “show tasks” command to the server and then parse the return string to see if a consistency check is running.

Instead of that, I would set up some debugging where you dump the contents of the items in the document that your selection criteria is based on to be sure the changes you think are being made are actually being performed as expected.

Subject: RE: Checking For Consistency Checks

I did just that, Chad.

I have included additional checks in the VB to see if those fields are already changed and if so, dont run against the document at all. Its a work around, I know, and if it happens again at least I’ll know that the failure was in the first run and not the second.

I appreciate your response. Thanks.

Also, I had searched the forum and others has asked a similar question previously, but I thought maybe I’d just throw it out there one more time anyway.

Subject: RE: Checking For Consistency Checks

You didn’t mention - are you refreshing the view before the agent actually updates any documents ?

Maybe the hidden view isn’t always being updated.

Subject: RE: Checking For Consistency Checks

Interesting point. A total of 2 agents run in succession and at the end of the first is when I am doing the refresh. If there is any lag time between the 2, it may be advantageous to do one at the beginning instead (or as well).

Thanks Much for the suggestion.