File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed
fdb-record-layer-core/src/main/java/com/apple/foundationdb/record Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ public enum LogMessageKeys {
58
58
TRANSACTION_ID ,
59
59
TRANSACTION_NAME ,
60
60
AGE_SECONDS ,
61
+ AGE_MILLISECONDS ,
61
62
CONSTITUENT ,
62
63
TOTAL_MICROS ,
63
64
// record splitting/unsplitting
@@ -162,6 +163,7 @@ public enum LogMessageKeys {
162
163
RECORDS_PER_SECOND ,
163
164
DOCUMENT ,
164
165
SESSION_ID ,
166
+ EXISTING_SESSION_ID ,
165
167
INDEXER_SESSION_ID ,
166
168
INDEXER_ID ,
167
169
INDEX_STATE_PRECONDITION ,
Original file line number Diff line number Diff line change @@ -1027,7 +1027,11 @@ public CompletableFuture<Void> rebuildIndexAsync(@Nonnull FDBRecordStore store)
1027
1027
return rangeSet .insertRangeAsync (null , null );
1028
1028
}))
1029
1029
.thenCompose (vignore -> setIndexingTypeOrThrow (store , false ))
1030
- .thenCompose (vignore -> rebuildIndexInternalAsync (store ));
1030
+ .thenCompose (vignore -> rebuildIndexInternalAsync (store ))
1031
+ .thenCompose (vignore -> forEachTargetIndex (index -> {
1032
+ clearHeartbeatSingleTarget (store , index );
1033
+ return null ;
1034
+ }));
1031
1035
}
1032
1036
1033
1037
abstract CompletableFuture <Void > rebuildIndexInternalAsync (FDBRecordStore store );
Original file line number Diff line number Diff line change @@ -96,7 +96,11 @@ private void validateNonCompetingHeartbeat(KeyValue kv) {
96
96
final IndexBuildProto .IndexingHeartbeat otherHeartbeat = IndexBuildProto .IndexingHeartbeat .parseFrom (kv .getValue ());
97
97
final long age = now - otherHeartbeat .getHeartbeatTimeMilliseconds ();
98
98
if (age > 0 && age < leaseLength ) {
99
- throw new SynchronizedSessionLockedException ("Failed to initialize the session because of an existing session in progress" );
99
+ throw new SynchronizedSessionLockedException ("Failed to initialize the session because of an existing session in progress" )
100
+ .addLogInfo (LogMessageKeys .SESSION_ID , sessionId )
101
+ .addLogInfo (LogMessageKeys .EXISTING_SESSION_ID , otherSessionId )
102
+ .addLogInfo (LogMessageKeys .AGE_MILLISECONDS , age )
103
+ .addLogInfo (LogMessageKeys .TIME_LIMIT_MILLIS , leaseLength );
100
104
// TODO: log details
101
105
}
102
106
} catch (InvalidProtocolBufferException e ) {
You can’t perform that action at this time.
0 commit comments