OAK-1807 - ConstraintViolationException seen with multiple Oak/Mongo with ConcurrentCreateNodesTest

Updating logic to match closer to the one in benchmark. Now one worker thread per cluster is left to run for configured duration of time

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1594127 13f79535-47bb-0310-9956-ffa450edef68
OAK-1807 - ConstraintViolationException seen with multiple Oak/Mongo with ConcurrentCreateNodesTest

Enhancing the testcase and for now ignoring it. Issue still not reproducible with runtime of 10 mins

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1594128 13f79535-47bb-0310-9956-ffa450edef68
OAK-1813 - LastRevSingleNodeRecoveryTest fails with Mongo

lastRevisionTimestamp was not getting reset when Revision clock was getting reset in test execution. This caused mismatch in timings. As a fix the  lastRevisionTimestamp would be set to clock time upon reset

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1594158 13f79535-47bb-0310-9956-ffa450edef68
OAK-1645 - Route find queries to Mongo secondary in MongoDocumentStore

Refactor access to previous doc to find previous doc with maxAge set to max value so as to enable reads of previous documents from secondaries

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1594159 13f79535-47bb-0310-9956-ffa450edef68
OAK-1645 - Route find queries to Mongo secondary in MongoDocumentStore

Use explicit read preferences to ensure that reads are routed to primary irrespective of default global settings

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1594160 13f79535-47bb-0310-9956-ffa450edef68
OAK-1645 - Route find queries to Mongo secondary in MongoDocumentStore

The find and query method now explicitly define the read preference to be used. The preference is determined by type of Collection , maxCacheAge and modified time of parent. if preference is secondary then actual preference used is picked from DB level settings

Also exposed a setting 'maxReplicationLagMillis' which determines the max possible lag in replication beyond which its safe to route the read queries to secondaries

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1594161 13f79535-47bb-0310-9956-ffa450edef68
OAK-1645 - Route find queries to Mongo secondary in MongoDocumentStore

Instead of explicitly specifying the readPreference (as secondary) the preference value is picked from DB level setting allowing the user to fine tune the preferences via mongouri

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1594162 13f79535-47bb-0310-9956-ffa450edef68
OAK-1645 - Route find queries to Mongo secondary in MongoDocumentStore

Expose the setting for 'maxReplicationLagInSecs' which defaults to 6 hours

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1594163 13f79535-47bb-0310-9956-ffa450edef68
OAK-1645 - Route find queries to Mongo secondary in MongoDocumentStore

Do not use the clock from builder for now as it causes other testcases to fail as some aspects of code still use System.currenttime.

Instead one can specify custom clock directly for testing purpose. This localizes clock change for testing

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1594164 13f79535-47bb-0310-9956-ffa450edef68
OAK-1645 - Route find queries to Mongo secondary in MongoDocumentStore

Fix logic related to determining the parentId when query is being performed as fromKey are not valid id in some cases

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1594166 13f79535-47bb-0310-9956-ffa450edef68
OAK-1645 - Route find queries to Mongo secondary in MongoDocumentStore

Integrate with changes done in OAK-759. The readWriteMode is now parsed as MongoUri option. The default value read is now read per collection. So if custom readWrite mode is specified then that value be used otherwise global DB level value would be used

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1594167 13f79535-47bb-0310-9956-ffa450edef68
OAK-1645 - Route find queries to Mongo secondary in MongoDocumentStore

Log when call is routed to secondary

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1594169 13f79535-47bb-0310-9956-ffa450edef68
OAK-301 : oak docu

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1594180 13f79535-47bb-0310-9956-ffa450edef68
OAK-301 : oak docu

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1594185 13f79535-47bb-0310-9956-ffa450edef68
OAK-1815: Don't create default (Scheduled)Executor when respective instance is supplied
Create executor service instances only when needed

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1594205 13f79535-47bb-0310-9956-ffa450edef68
OAK-1812

- catch attempts to write blobs that are too long
- add tests
- increase default blob size in DB2

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1594207 13f79535-47bb-0310-9956-ffa450edef68
OAK-1812 - Fix commit mode for Postgres, remove println from test case

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1594222 13f79535-47bb-0310-9956-ffa450edef68
OAK-301 : oak docu

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1594234 13f79535-47bb-0310-9956-ffa450edef68
OAK-1589: MongoDocumentStore fails to report error for keys that are too long

Revert fix to make TCK tests pass again.

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1594236 13f79535-47bb-0310-9956-ffa450edef68
OAK-1814: RevisionComparator my incorrectly report a revision as FUTURE

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1594237 13f79535-47bb-0310-9956-ffa450edef68