Skip to content

Commit

Permalink
perf: enable compaction during reconnects (#17129)
Browse files Browse the repository at this point in the history
Signed-off-by: Oleg Mazurov <[email protected]>
  • Loading branch information
OlegMazurov authored Dec 20, 2024
1 parent a969270 commit aee0358
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ public MerkleDbDataSource copyDataSource(
final String label = dataSource.getTableName();
final int tableId = getNextTableId();
importDataSource(dataSource, tableId, !makeCopyPrimary, makeCopyPrimary); // import to itself == copy
return getDataSource(tableId, label, false, offlineUse);
return getDataSource(tableId, label, makeCopyPrimary, offlineUse);
}

private void importDataSource(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1704,9 +1704,6 @@ public void endLearnerReconnect() {
originalMap = null;
logger.info(RECONNECT.getMarker(), "call postInit()");
postInit(fullyReconnectedState);
// Start up data source compaction now
logger.info(RECONNECT.getMarker(), "call dataSource.enableBackgroundCompaction()");
dataSource.enableBackgroundCompaction();
} catch (ExecutionException e) {
final var message = "VirtualMap@" + getRoute() + " failed to get hash during learner reconnect";
throw new MerkleSynchronizationException(message, e);
Expand Down

0 comments on commit aee0358

Please sign in to comment.