> missing "h" in method name "syncWitCluster"
Good catch, thanks!
> I'm still uneasy with the idea of having journal.sync() being potentially called with every
> Repository.login() and Session.refresh(), thinking of applications that e.g. test the repository
> availability by intermittently calling Repository.login().
The performance hit is a single SELECT statement (for DatabaseJournal) or a directory listing (for FileJournal). I don't think that's too much, but you're right in that there are cases (one example is a web site without a session pool) where avoiding any extra perfromance hit on login() would be beneficial.
I think it would be OK if we didn't trigger the cluster sync on login(). A client could still use refresh() to ensure causal consistency (Micah's use case).
> What about specifying a lower bound on the delay (e.g. 1 second) that should pass before
> another journal sync actually takes place?
That would kind of defeat the purpose as the client would then have no way (apart from explicitly waiting for that one second and retrying the sync) to ensure consistent access to the repository.