You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "zhouxu (JIRA)" <ji...@apache.org> on 2019/01/23 03:25:00 UTC
[jira] [Created] (OAK-7999) system starts within the lease time
120s for local junit test
zhouxu created OAK-7999:
---------------------------
Summary: system starts within the lease time 120s for local junit test
Key: OAK-7999
URL: https://issues.apache.org/jira/browse/OAK-7999
Project: Jackrabbit Oak
Issue Type: Bug
Components: api
Affects Versions: 1.10
Reporter: zhouxu
1) First ,we use oak api to get DocumentNodeStore quickly, cluster node id 1 is assigned
2) Second, get DocumentNodeStore within the lease time (120s), a new cluster node id is assigned。It takes a long time to do a unit test.
our get DocumentNodeStore code like this:
Configuration configuration = new PropertiesConfiguration("repository.properties");
dataStore = configuration.getString("repository.datastore");
mongodbUri = configuration.getString("repository.mongodb.uri");
mongodbName = configuration.getString("repository.mongodb.db");
DocumentNodeStore documentNodeStore = newMongoDocumentNodeStoreBuilder()
.setMongoDB(mongodbUri, mongodbName, 0)
.setBlobStore(new FileBlobStore("/Users/lili/Documents/dev/oak/file_data"))
.build();
if(repository==null){
repository = new Jcr(new Oak(documentNodeStore)).createRepository();
}
the logs like this:
019-01-23 11:04:39 afc_jcr [org.apache.jackrabbit.oak.plugins.document.ClusterNodeInfo]-[main]-[waitForLeaseExpiry]-[629]-[INFO] Found an existing possibly active cluster node info (1) for this instance: mac:0616ba19daff//Users/zhouxu/Documents/workspace/idea/AFC_JCR_V1.0, will try use it.
2019-01-23 11:04:39 afc_jcr [org.apache.jackrabbit.oak.plugins.document.ClusterNodeInfo]-[main]-[waitForLeaseExpiry]-[636]-[INFO] Waiting for cluster node 1's lease to expire: 110s left
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)