function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
efletcherefletcher 

getUpdated time range

Here is my situation:  I am trying to data replication with SForce and our App.  I've created a class that will poll SForce for data and while unit testing I came across a problem.  I'll try to explain it as clearly as I can:

1-I programatically create an Account object during the set up of my JUnit test case.  This is the fixture I am trying to retrieve when I do the subsequent getUpdate call.

2-After the Account is created, I then poll SForce for changes.  The start time is my last successful poll time, which is set prior to creating the account object, and the end time is the current time.

3-I have observed that the Account is indeed created by pausing the debugger, confirming the Account is present in the UI prior to making the getUpdated call, then continuing on to make the getUpdated call.

My problem is that even though the Account is created, it is not retrieved by the FIRST call to getUpdated.  If I wait a minute, the Account is retreived by the getUpdated call.  Is the fact that the seconds are ignored causing me to miss the insert I just made?  And I guess that begs the question, are the times passed to the getUpdated method inclusive on both ends?  If they are, and the seconds are ingnore, then if the insert is one millisecond after the start time, they should be the same minute, and the Insert should be retrieved, correct?

I apologize if I'm being unclear, but I can't solve this problem.  I'm also curious why you made the call to ignore the seconds.  Doesn't that introduce gaps or problems with polling for data changes?

Thanks in advance,

Eric

DevAngelDevAngel

Hi efletcher,

Hmm..  I've got a db replication client running every minute.  I log the start time and end time.  When I create an account, it shows up on the next poll and checking the SystemModstamp value, it lies in between my start time and end time.  My start time and end time is with a few seconds of the actual time.

Try logging all three time values.  Then post the log here.

djordandjordan

Instead of calling getUpdate("account", timestamp), try using these 2 queries:

select blah from account where systemModstamp > timestamp

select blah from account where systemModstamp >= timestamp

 

Is there a difference?