[ 
https://issues.apache.org/jira/browse/JCR-940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12527480
 ] 

Martijn Hendriks commented on JCR-940:
--------------------------------------

> Great! The patch looks very good!
Thanks!

> I will apply it in my environment, test it, and then commit it. The 
> 'blockOnConnectionLoss' feature is OK, what is your use case? Just one 
> remark: 

Our application caches query results that we know to be stable. If some nodes 
in the result set of such a query are not yet in the Jackrabbit caches and the 
connection is lost, then they are skipped in the NodeIterator for the queries 
result. I.e., our caches could get out-of-sync when the connection is lost, 
which would require a restart. Blocking within Jackrabbit solves this 
transparently, and this patch makes a first attempt at that. Currently one 
statement/changelog fails before blocking, i.e. that statement/changelog is 
lost, so with very bad luck our caches could still get out of sync. I'm still 
thinking on how to block on this first statement/changelog in an elegant way. 
Of course, we get a lot of contention, but that would - in theory be resolved - 
when the connection comes up again.

> Currently TRIALS is 2, that means giving up after at most 1 second. I think 
> that's a bit short. What about setting TRIALS to 10? It will then try at
> most 5 seconds, enough for a unstable wireless connection (not sure if this 
> is a use case).

Yes, 10 is fine.

Martijn

> add db connection autoConnect for BundleDbPersistenceManager.
> -------------------------------------------------------------
>
>                 Key: JCR-940
>                 URL: https://issues.apache.org/jira/browse/JCR-940
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.3
>            Reporter: Xiaohua Lu
>         Attachments: JCR-940-v2.patch, JCR-940-v3.patch, JCR-940.patch
>
>
> Since bundled db pm doesn't inherited from database pm, it can't reconnect 
> once database is bounced. it would be nice to add this feature. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to