|Problem calling syncitems with no start date on an older journal
||[Jul. 29th, 2008|05:01 pm]
This is a revision of a previous question I submitted, with more information.
IMPORTANT EDIT: I found that the problem is not what I thought it was, and the error should now be easy to reproduce. The problem occurs when the built-in edit journal privacy tool is used. I have edited this entry to reflect this fact, and removed misleading references to the problem occurring on "large journals."
When the LJ-SEC tool tries to download my journal history (via a syncitems request) the server never responds.
I created a simple test journal to determine the cause: oak_and_sage. This journal has only seven entries. I did many things to this journal, and tested LJ-SEC after each one; the syncitems call began timing out immediately after I used the built-in edit journal privacy tool to change all public entries to friends only.
I've done a little debugging (since LJ-SEC is open source) to determine what's going on. The server is failing to respond to the initial syncitems call (when it has never done a sync before).
Here is the LJ-SEC code to transmit a web call to LJ:
( LJ-SEC source codeCollapse )
I wrote a log of the timed-out transmission (on sithjawa) to a file. Here's what I found.
( Transmission informationCollapse )
Is this expected behavior? What should be done to prevent it?
EDIT: I found the following in the protocol guide: (link to actual page in the guide)
syncitems. If you are trying to download someone's entire journal, this is the mode to use. This mode is the only way you can account for edits that the user has made to their entries without using your client. This is also the most efficient way of downloading entries, because the server will send you a bunch at a time (say, 100). This mode is used in conjunction with the appropriately titled
syncitems client protocol mode.
Looking at the LJ-SEC code, it appears to be following the procedure outlined in the pseudocode example for properly downloading all items in a journal. This makes the timeout even more puzzling.