Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-7999

system starts within the lease time 120s for local junit test

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Invalid
    • None
    • None
    • api
    • None

    Description

      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/lili/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

      Attachments

        Activity

          People

            Unassigned Unassigned
            zhouxu245 zhouxu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: