mongock: Lock doesn't get update with same owner when embedded
From @abinet
@dieppa Just tried the 3.3.0-BETA and unfortunately the issue still exists. I’ve added some logging to illustrate:
11:03:58.438 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock trying to acquire the lock
11:03:58.438 [main] INFO LockMongoRepository - acquireLockQuery: And Filter{filters=[Filter{fieldName='key', value=DEFAULT_LOCK}, Filter{fieldName='status', value=LOCK_HELD}, Or Filter{filters=[Operator Filter{fieldName='expiresAt', operator='$lt', value=Tue Apr 28 11:03:58 CEST 2020}, Filter{fieldName='owner', value=3294fd2b-9add-4e38-b1c1-dc6e71ccde89}]}]}, fullDBObject Document{{key=DEFAULT_LOCK, status=LOCK_HELD, owner=3294fd2b-9add-4e38-b1c1-dc6e71ccde89, expiresAt=Tue Apr 28 11:06:58 CEST 2020}}
11:03:58.438 [main] INFO LockMongoRepository - lockHeld: false, result.getModifiedCount() 0, result.getUpsertedId() BsonObjectId{value=5ea7f17e5da121ee25296334}
11:03:58.438 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock acquired the lock until: Tue Apr 28 11:06:58 CEST 2020
11:03:58.438 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock trying to acquire the lock
11:03:58.438 [main] INFO LockMongoRepository - acquireLockQuery: And Filter{filters=[Filter{fieldName='key', value=DEFAULT_LOCK}, Filter{fieldName='status', value=LOCK_HELD}, Or Filter{filters=[Operator Filter{fieldName='expiresAt', operator='$lt', value=Tue Apr 28 11:03:58 CEST 2020}, Filter{fieldName='owner', value=3294fd2b-9add-4e38-b1c1-dc6e71ccde89}]}]}, fullDBObject Document{{key=DEFAULT_LOCK, status=LOCK_HELD, owner=3294fd2b-9add-4e38-b1c1-dc6e71ccde89, expiresAt=Tue Apr 28 11:06:58 CEST 2020}}
11:03:58.439 [main] INFO LockMongoRepository - lockHeld: true, result.getModifiedCount() 0, result.getUpsertedId() null
11:03:58.439 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock trying to acquire the lock
11:03:58.439 [main] INFO LockMongoRepository - acquireLockQuery: And Filter{filters=[Filter{fieldName='key', value=DEFAULT_LOCK}, Filter{fieldName='status', value=LOCK_HELD}, Or Filter{filters=[Operator Filter{fieldName='expiresAt', operator='$lt', value=Tue Apr 28 11:03:58 CEST 2020}, Filter{fieldName='owner', value=3294fd2b-9add-4e38-b1c1-dc6e71ccde89}]}]}, fullDBObject Document{{key=DEFAULT_LOCK, status=LOCK_HELD, owner=3294fd2b-9add-4e38-b1c1-dc6e71ccde89, expiresAt=Tue Apr 28 11:06:58 CEST 2020}}
11:03:58.440 [main] INFO LockMongoRepository - lockHeld: false, result.getModifiedCount() 1, result.getUpsertedId() null
11:03:58.440 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock acquired the lock until: Tue Apr 28 11:06:58 CEST 2020
11:03:58.440 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock trying to acquire the lock
11:03:58.440 [main] INFO LockMongoRepository - acquireLockQuery: And Filter{filters=[Filter{fieldName='key', value=DEFAULT_LOCK}, Filter{fieldName='status', value=LOCK_HELD}, Or Filter{filters=[Operator Filter{fieldName='expiresAt', operator='$lt', value=Tue Apr 28 11:03:58 CEST 2020}, Filter{fieldName='owner', value=3294fd2b-9add-4e38-b1c1-dc6e71ccde89}]}]}, fullDBObject Document{{key=DEFAULT_LOCK, status=LOCK_HELD, owner=3294fd2b-9add-4e38-b1c1-dc6e71ccde89, expiresAt=Tue Apr 28 11:06:58 CEST 2020}}
11:03:58.440 [main] INFO LockMongoRepository - lockHeld: false, result.getModifiedCount() 1, result.getUpsertedId() null
11:03:58.440 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock acquired the lock until: Tue Apr 28 11:06:58 CEST 2020
11:03:58.441 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock trying to acquire the lock
11:03:58.441 [main] INFO LockMongoRepository - acquireLockQuery: And Filter{filters=[Filter{fieldName='key', value=DEFAULT_LOCK}, Filter{fieldName='status', value=LOCK_HELD}, Or Filter{filters=[Operator Filter{fieldName='expiresAt', operator='$lt', value=Tue Apr 28 11:03:58 CEST 2020}, Filter{fieldName='owner', value=3294fd2b-9add-4e38-b1c1-dc6e71ccde89}]}]}, fullDBObject Document{{key=DEFAULT_LOCK, status=LOCK_HELD, owner=3294fd2b-9add-4e38-b1c1-dc6e71ccde89, expiresAt=Tue Apr 28 11:06:58 CEST 2020}}
11:03:58.441 [main] INFO LockMongoRepository - lockHeld: false, result.getModifiedCount() 1, result.getUpsertedId() null
11:03:58.441 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock acquired the lock until: Tue Apr 28 11:06:58 CEST 2020
11:03:58.441 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock trying to acquire the lock
11:03:58.441 [main] INFO LockMongoRepository - acquireLockQuery: And Filter{filters=[Filter{fieldName='key', value=DEFAULT_LOCK}, Filter{fieldName='status', value=LOCK_HELD}, Or Filter{filters=[Operator Filter{fieldName='expiresAt', operator='$lt', value=Tue Apr 28 11:03:58 CEST 2020}, Filter{fieldName='owner', value=3294fd2b-9add-4e38-b1c1-dc6e71ccde89}]}]}, fullDBObject Document{{key=DEFAULT_LOCK, status=LOCK_HELD, owner=3294fd2b-9add-4e38-b1c1-dc6e71ccde89, expiresAt=Tue Apr 28 11:06:58 CEST 2020}}
11:03:58.442 [main] INFO LockMongoRepository - lockHeld: true, result.getModifiedCount() 0, result.getUpsertedId() null
11:03:58.442 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock trying to acquire the lock
11:03:58.442 [main] INFO LockMongoRepository - acquireLockQuery: And Filter{filters=[Filter{fieldName='key', value=DEFAULT_LOCK}, Filter{fieldName='status', value=LOCK_HELD}, Or Filter{filters=[Operator Filter{fieldName='expiresAt', operator='$lt', value=Tue Apr 28 11:03:58 CEST 2020}, Filter{fieldName='owner', value=3294fd2b-9add-4e38-b1c1-dc6e71ccde89}]}]}, fullDBObject Document{{key=DEFAULT_LOCK, status=LOCK_HELD, owner=3294fd2b-9add-4e38-b1c1-dc6e71ccde89, expiresAt=Tue Apr 28 11:06:58 CEST 2020}}
11:03:58.442 [main] INFO LockMongoRepository - lockHeld: false, result.getModifiedCount() 1, result.getUpsertedId() null
11:03:58.442 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock acquired the lock until: Tue Apr 28 11:06:58 CEST 2020
11:03:58.442 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock trying to acquire the lock
11:03:58.442 [main] INFO LockMongoRepository - acquireLockQuery: And Filter{filters=[Filter{fieldName='key', value=DEFAULT_LOCK}, Filter{fieldName='status', value=LOCK_HELD}, Or Filter{filters=[Operator Filter{fieldName='expiresAt', operator='$lt', value=Tue Apr 28 11:03:58 CEST 2020}, Filter{fieldName='owner', value=3294fd2b-9add-4e38-b1c1-dc6e71ccde89}]}]}, fullDBObject Document{{key=DEFAULT_LOCK, status=LOCK_HELD, owner=3294fd2b-9add-4e38-b1c1-dc6e71ccde89, expiresAt=Tue Apr 28 11:06:58 CEST 2020}}
11:03:58.443 [main] INFO LockMongoRepository - lockHeld: true, result.getModifiedCount() 0, result.getUpsertedId() null
11:03:58.443 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock trying to acquire the lock
11:03:58.443 [main] INFO LockMongoRepository - acquireLockQuery: And Filter{filters=[Filter{fieldName='key', value=DEFAULT_LOCK}, Filter{fieldName='status', value=LOCK_HELD}, Or Filter{filters=[Operator Filter{fieldName='expiresAt', operator='$lt', value=Tue Apr 28 11:03:58 CEST 2020}, Filter{fieldName='owner', value=3294fd2b-9add-4e38-b1c1-dc6e71ccde89}]}]}, fullDBObject Document{{key=DEFAULT_LOCK, status=LOCK_HELD, owner=3294fd2b-9add-4e38-b1c1-dc6e71ccde89, expiresAt=Tue Apr 28 11:06:58 CEST 2020}}
11:03:58.443 [main] INFO LockMongoRepository - lockHeld: false, result.getModifiedCount() 1, result.getUpsertedId() null
11:03:58.443 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock acquired the lock until: Tue Apr 28 11:06:58 CEST 2020
11:03:58.444 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock trying to acquire the lock
11:03:58.444 [main] INFO LockMongoRepository - acquireLockQuery: And Filter{filters=[Filter{fieldName='key', value=DEFAULT_LOCK}, Filter{fieldName='status', value=LOCK_HELD}, Or Filter{filters=[Operator Filter{fieldName='expiresAt', operator='$lt', value=Tue Apr 28 11:03:58 CEST 2020}, Filter{fieldName='owner', value=3294fd2b-9add-4e38-b1c1-dc6e71ccde89}]}]}, fullDBObject Document{{key=DEFAULT_LOCK, status=LOCK_HELD, owner=3294fd2b-9add-4e38-b1c1-dc6e71ccde89, expiresAt=Tue Apr 28 11:06:58 CEST 2020}}
11:03:58.445 [main] INFO LockMongoRepository - lockHeld: false, result.getModifiedCount() 1, result.getUpsertedId() null
11:03:58.445 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock acquired the lock until: Tue Apr 28 11:06:58 CEST 2020
11:03:58.445 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock trying to acquire the lock
11:03:58.445 [main] INFO LockMongoRepository - acquireLockQuery: And Filter{filters=[Filter{fieldName='key', value=DEFAULT_LOCK}, Filter{fieldName='status', value=LOCK_HELD}, Or Filter{filters=[Operator Filter{fieldName='expiresAt', operator='$lt', value=Tue Apr 28 11:03:58 CEST 2020}, Filter{fieldName='owner', value=3294fd2b-9add-4e38-b1c1-dc6e71ccde89}]}]}, fullDBObject Document{{key=DEFAULT_LOCK, status=LOCK_HELD, owner=3294fd2b-9add-4e38-b1c1-dc6e71ccde89, expiresAt=Tue Apr 28 11:06:58 CEST 2020}}
11:03:58.445 [main] INFO LockMongoRepository - lockHeld: false, result.getModifiedCount() 1, result.getUpsertedId() null
11:03:58.445 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock acquired the lock until: Tue Apr 28 11:06:58 CEST 2020
11:03:58.445 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock trying to acquire the lock
11:03:58.445 [main] INFO LockMongoRepository - acquireLockQuery: And Filter{filters=[Filter{fieldName='key', value=DEFAULT_LOCK}, Filter{fieldName='status', value=LOCK_HELD}, Or Filter{filters=[Operator Filter{fieldName='expiresAt', operator='$lt', value=Tue Apr 28 11:03:58 CEST 2020}, Filter{fieldName='owner', value=3294fd2b-9add-4e38-b1c1-dc6e71ccde89}]}]}, fullDBObject Document{{key=DEFAULT_LOCK, status=LOCK_HELD, owner=3294fd2b-9add-4e38-b1c1-dc6e71ccde89, expiresAt=Tue Apr 28 11:06:58 CEST 2020}}
11:03:58.445 [main] INFO LockMongoRepository - lockHeld: true, result.getModifiedCount() 0, result.getUpsertedId() null
11:03:58.446 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock trying to acquire the lock
11:03:58.446 [main] INFO LockMongoRepository - acquireLockQuery: And Filter{filters=[Filter{fieldName='key', value=DEFAULT_LOCK}, Filter{fieldName='status', value=LOCK_HELD}, Or Filter{filters=[Operator Filter{fieldName='expiresAt', operator='$lt', value=Tue Apr 28 11:03:58 CEST 2020}, Filter{fieldName='owner', value=3294fd2b-9add-4e38-b1c1-dc6e71ccde89}]}]}, fullDBObject Document{{key=DEFAULT_LOCK, status=LOCK_HELD, owner=3294fd2b-9add-4e38-b1c1-dc6e71ccde89, expiresAt=Tue Apr 28 11:06:58 CEST 2020}}
11:03:58.446 [main] INFO LockMongoRepository - lockHeld: false, result.getModifiedCount() 1, result.getUpsertedId() null
11:03:58.446 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock acquired the lock until: Tue Apr 28 11:06:58 CEST 2020
11:03:58.446 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock trying to acquire the lock
11:03:58.447 [main] INFO LockMongoRepository - acquireLockQuery: And Filter{filters=[Filter{fieldName='key', value=DEFAULT_LOCK}, Filter{fieldName='status', value=LOCK_HELD}, Or Filter{filters=[Operator Filter{fieldName='expiresAt', operator='$lt', value=Tue Apr 28 11:03:58 CEST 2020}, Filter{fieldName='owner', value=3294fd2b-9add-4e38-b1c1-dc6e71ccde89}]}]}, fullDBObject Document{{key=DEFAULT_LOCK, status=LOCK_HELD, owner=3294fd2b-9add-4e38-b1c1-dc6e71ccde89, expiresAt=Tue Apr 28 11:06:58 CEST 2020}}
11:03:58.447 [main] INFO LockMongoRepository - lockHeld: true, result.getModifiedCount() 0, result.getUpsertedId() null
11:03:58.447 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock trying to acquire the lock
11:03:58.447 [main] INFO LockMongoRepository - acquireLockQuery: And Filter{filters=[Filter{fieldName='key', value=DEFAULT_LOCK}, Filter{fieldName='status', value=LOCK_HELD}, Or Filter{filters=[Operator Filter{fieldName='expiresAt', operator='$lt', value=Tue Apr 28 11:03:58 CEST 2020}, Filter{fieldName='owner', value=3294fd2b-9add-4e38-b1c1-dc6e71ccde89}]}]}, fullDBObject Document{{key=DEFAULT_LOCK, status=LOCK_HELD, owner=3294fd2b-9add-4e38-b1c1-dc6e71ccde89, expiresAt=Tue Apr 28 11:06:58 CEST 2020}}
11:03:58.448 [main] INFO LockMongoRepository - lockHeld: false, result.getModifiedCount() 1, result.getUpsertedId() null
11:03:58.448 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock acquired the lock until: Tue Apr 28 11:06:58 CEST 2020
11:03:58.448 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock trying to acquire the lock
11:03:58.448 [main] INFO LockMongoRepository - acquireLockQuery: And Filter{filters=[Filter{fieldName='key', value=DEFAULT_LOCK}, Filter{fieldName='status', value=LOCK_HELD}, Or Filter{filters=[Operator Filter{fieldName='expiresAt', operator='$lt', value=Tue Apr 28 11:03:58 CEST 2020}, Filter{fieldName='owner', value=3294fd2b-9add-4e38-b1c1-dc6e71ccde89}]}]}, fullDBObject Document{{key=DEFAULT_LOCK, status=LOCK_HELD, owner=3294fd2b-9add-4e38-b1c1-dc6e71ccde89, expiresAt=Tue Apr 28 11:06:58 CEST 2020}}
11:03:58.448 [main] INFO LockMongoRepository - lockHeld: false, result.getModifiedCount() 1, result.getUpsertedId() null
11:03:58.448 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock acquired the lock until: Tue Apr 28 11:06:58 CEST 2020
11:03:58.448 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock trying to acquire the lock
11:03:58.448 [main] INFO LockMongoRepository - acquireLockQuery: And Filter{filters=[Filter{fieldName='key', value=DEFAULT_LOCK}, Filter{fieldName='status', value=LOCK_HELD}, Or Filter{filters=[Operator Filter{fieldName='expiresAt', operator='$lt', value=Tue Apr 28 11:03:58 CEST 2020}, Filter{fieldName='owner', value=3294fd2b-9add-4e38-b1c1-dc6e71ccde89}]}]}, fullDBObject Document{{key=DEFAULT_LOCK, status=LOCK_HELD, owner=3294fd2b-9add-4e38-b1c1-dc6e71ccde89, expiresAt=Tue Apr 28 11:06:58 CEST 2020}}
11:03:58.448 [main] INFO LockMongoRepository - lockHeld: true, result.getModifiedCount() 0, result.getUpsertedId() null
11:03:58.449 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock trying to acquire the lock
11:03:58.449 [main] INFO LockMongoRepository - acquireLockQuery: And Filter{filters=[Filter{fieldName='key', value=DEFAULT_LOCK}, Filter{fieldName='status', value=LOCK_HELD}, Or Filter{filters=[Operator Filter{fieldName='expiresAt', operator='$lt', value=Tue Apr 28 11:03:58 CEST 2020}, Filter{fieldName='owner', value=3294fd2b-9add-4e38-b1c1-dc6e71ccde89}]}]}, fullDBObject Document{{key=DEFAULT_LOCK, status=LOCK_HELD, owner=3294fd2b-9add-4e38-b1c1-dc6e71ccde89, expiresAt=Tue Apr 28 11:06:58 CEST 2020}}
11:03:58.449 [main] INFO LockMongoRepository - lockHeld: false, result.getModifiedCount() 1, result.getUpsertedId() null
11:03:58.449 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock acquired the lock until: Tue Apr 28 11:06:58 CEST 2020
11:03:58.449 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock trying to acquire the lock
11:03:58.449 [main] INFO LockMongoRepository - acquireLockQuery: And Filter{filters=[Filter{fieldName='key', value=DEFAULT_LOCK}, Filter{fieldName='status', value=LOCK_HELD}, Or Filter{filters=[Operator Filter{fieldName='expiresAt', operator='$lt', value=Tue Apr 28 11:03:58 CEST 2020}, Filter{fieldName='owner', value=3294fd2b-9add-4e38-b1c1-dc6e71ccde89}]}]}, fullDBObject Document{{key=DEFAULT_LOCK, status=LOCK_HELD, owner=3294fd2b-9add-4e38-b1c1-dc6e71ccde89, expiresAt=Tue Apr 28 11:06:58 CEST 2020}}
11:03:58.450 [main] INFO LockMongoRepository - lockHeld: true, result.getModifiedCount() 0, result.getUpsertedId() null
11:03:58.450 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock trying to acquire the lock
11:03:58.450 [main] INFO LockMongoRepository - acquireLockQuery: And Filter{filters=[Filter{fieldName='key', value=DEFAULT_LOCK}, Filter{fieldName='status', value=LOCK_HELD}, Or Filter{filters=[Operator Filter{fieldName='expiresAt', operator='$lt', value=Tue Apr 28 11:03:58 CEST 2020}, Filter{fieldName='owner', value=3294fd2b-9add-4e38-b1c1-dc6e71ccde89}]}]}, fullDBObject Document{{key=DEFAULT_LOCK, status=LOCK_HELD, owner=3294fd2b-9add-4e38-b1c1-dc6e71ccde89, expiresAt=Tue Apr 28 11:06:58 CEST 2020}}
11:03:58.450 [main] INFO LockMongoRepository - lockHeld: false, result.getModifiedCount() 1, result.getUpsertedId() null
11:03:58.450 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock acquired the lock until: Tue Apr 28 11:06:58 CEST 2020
11:03:58.450 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock trying to acquire the lock
11:03:58.450 [main] INFO LockMongoRepository - acquireLockQuery: And Filter{filters=[Filter{fieldName='key', value=DEFAULT_LOCK}, Filter{fieldName='status', value=LOCK_HELD}, Or Filter{filters=[Operator Filter{fieldName='expiresAt', operator='$lt', value=Tue Apr 28 11:03:58 CEST 2020}, Filter{fieldName='owner', value=3294fd2b-9add-4e38-b1c1-dc6e71ccde89}]}]}, fullDBObject Document{{key=DEFAULT_LOCK, status=LOCK_HELD, owner=3294fd2b-9add-4e38-b1c1-dc6e71ccde89, expiresAt=Tue Apr 28 11:06:58 CEST 2020}}
11:03:58.450 [main] INFO LockMongoRepository - lockHeld: true, result.getModifiedCount() 0, result.getUpsertedId() null
11:03:58.451 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock trying to acquire the lock
11:03:58.451 [main] INFO LockMongoRepository - acquireLockQuery: And Filter{filters=[Filter{fieldName='key', value=DEFAULT_LOCK}, Filter{fieldName='status', value=LOCK_HELD}, Or Filter{filters=[Operator Filter{fieldName='expiresAt', operator='$lt', value=Tue Apr 28 11:03:58 CEST 2020}, Filter{fieldName='owner', value=3294fd2b-9add-4e38-b1c1-dc6e71ccde89}]}]}, fullDBObject Document{{key=DEFAULT_LOCK, status=LOCK_HELD, owner=3294fd2b-9add-4e38-b1c1-dc6e71ccde89, expiresAt=Tue Apr 28 11:06:58 CEST 2020}}
11:03:58.451 [main] INFO LockMongoRepository - lockHeld: false, result.getModifiedCount() 1, result.getUpsertedId() null
11:03:58.451 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock acquired the lock until: Tue Apr 28 11:06:58 CEST 2020
11:03:58.451 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock trying to acquire the lock
11:03:58.451 [main] INFO LockMongoRepository - acquireLockQuery: And Filter{filters=[Filter{fieldName='key', value=DEFAULT_LOCK}, Filter{fieldName='status', value=LOCK_HELD}, Or Filter{filters=[Operator Filter{fieldName='expiresAt', operator='$lt', value=Tue Apr 28 11:03:58 CEST 2020}, Filter{fieldName='owner', value=3294fd2b-9add-4e38-b1c1-dc6e71ccde89}]}]}, fullDBObject Document{{key=DEFAULT_LOCK, status=LOCK_HELD, owner=3294fd2b-9add-4e38-b1c1-dc6e71ccde89, expiresAt=Tue Apr 28 11:06:58 CEST 2020}}
11:03:58.451 [main] INFO LockMongoRepository - lockHeld: true, result.getModifiedCount() 0, result.getUpsertedId() null
11:03:58.451 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock trying to acquire the lock
11:03:58.451 [main] INFO LockMongoRepository - acquireLockQuery: And Filter{filters=[Filter{fieldName='key', value=DEFAULT_LOCK}, Filter{fieldName='status', value=LOCK_HELD}, Or Filter{filters=[Operator Filter{fieldName='expiresAt', operator='$lt', value=Tue Apr 28 11:03:58 CEST 2020}, Filter{fieldName='owner', value=3294fd2b-9add-4e38-b1c1-dc6e71ccde89}]}]}, fullDBObject Document{{key=DEFAULT_LOCK, status=LOCK_HELD, owner=3294fd2b-9add-4e38-b1c1-dc6e71ccde89, expiresAt=Tue Apr 28 11:06:58 CEST 2020}}
11:03:58.451 [main] INFO LockMongoRepository - lockHeld: true, result.getModifiedCount() 0, result.getUpsertedId() null
11:03:58.451 [main] INFO c.g.cloudyrock.mongock.LockChecker - Mongock trying to acquire the lock
11:03:58.451 [main] INFO LockMongoRepository - acquireLockQuery: And Filter{filters=[Filter{fieldName='key', value=DEFAULT_LOCK}, Filter{fieldName='status', value=LOCK_HELD}, Or Filter{filters=[Operator Filter{fieldName='expiresAt', operator='$lt', value=Tue Apr 28 11:03:58 CEST 2020}, Filter{fieldName='owner', value=3294fd2b-9add-4e38-b1c1-dc6e71ccde89}]}]}, fullDBObject Document{{key=DEFAULT_LOCK, status=LOCK_HELD, owner=3294fd2b-9add-4e38-b1c1-dc6e71ccde89, expiresAt=Tue Apr 28 11:06:58 CEST 2020}}
11:03:58.452 [main] INFO LockMongoRepository - lockHeld: true, result.getModifiedCount() 0, result.getUpsertedId() null
11:03:58.452 [main] WARN o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mongock' defined in class path resource [****/MongoDbConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.github.cloudyrock.mongock.SpringBootMongock]: Factory method 'mongock' threw exception; nested exception is com.github.cloudyrock.mongock.LockCheckException: MaxTries(3) reached due to LockPersistenceException:
current lock: com.github.cloudyrock.mongock.LockEntry@9c2e017
new lock: Document{{key=DEFAULT_LOCK, status=LOCK_HELD, owner=3294fd2b-9add-4e38-b1c1-dc6e71ccde89, expiresAt=Tue Apr 28 11:06:58 CEST 2020}}
acquireLockQuery: And Filter{filters=[Filter{fieldName='key', value=DEFAULT_LOCK}, Filter{fieldName='status', value=LOCK_HELD}, Or Filter{filters=[Operator Filter{fieldName='expiresAt', operator='$lt', value=Tue Apr 28 11:03:58 CEST 2020}, Filter{fieldName='owner', value=3294fd2b-9add-4e38-b1c1-dc6e71ccde89}]}]}
db error detail: not db error
11:03:58.453 [main] INFO org.mongodb.driver.connection - Closed connection [connectionId{localValue:16, serverValue:2}] to localhost:42337 because the pool has been closed.
I must admit this happens not on every test but after 6-7th one, so it can be an embedded mongo missbehaviour. Probably not connected to the multi-threading (the tests are running sequencially)
_Originally posted by @abinet in https://github.com/cloudyrock/mongock/issues/148#issuecomment-620482247_
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (13 by maintainers)
@dieppa my tests are fixed as well.