Merge pull request #2047 from tclinken/lock-aware-db-ping

Use lock aware transaction for pingDatabase
This commit is contained in:
Evan Tschannen 2019-10-31 10:24:20 -07:00 committed by GitHub
commit 58b984b846
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -360,6 +360,7 @@ ACTOR Future<Void> pingDatabase( Database cx ) {
loop {
try {
tr.setOption( FDBTransactionOptions::PRIORITY_SYSTEM_IMMEDIATE );
tr.setOption( FDBTransactionOptions::LOCK_AWARE );
Optional<Value> v = wait( tr.get( StringRef("/Liveness/" + deterministicRandom()->randomUniqueID().toString() ) ) );
tr.makeSelfConflicting();
wait( tr.commit() );