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

Synchronous commit

    XMLWordPrintableJSON

Details

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

    Description

      We are using 1.48.0 version of oak-jcr. Out application stores the nodes and retrive it.

      We are using multiple pods of this application. and consider below scenario which is creating issue.

       

      Issue:

      We have two request as below:
      Create some node and save it.- this is routed from pod1. (this will be saved into mongo db after 1000ms with BackgroundUpdateOperation thread)
      Get created nodes - this is routed from pod2. (As this second request immediately executed, for pod2 recently created data is not available. )

      How we can commit the changes in synchronised manner.

       

      Code:

       LeaseCheckMode leaseCheckMode = Boolean.TRUE.equals(enableLeaseCheck) ? LeaseCheckMode.STRICT
                      : LeaseCheckMode.DISABLED;
              documentNodeStore = new MongoDocumentNodeStoreBuilder()
                      .setMongoDB(getMongoURI(), mongoDbName, 16)
                      .setLeaseCheckMode(leaseCheckMode)
                      .build();
             Repository repository = new Jcr(new Oak(documentNodeStore)).createRepository();
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: