rpuch commented on code in PR #5433:
URL: https://github.com/apache/ignite-3/pull/5433#discussion_r2005711164
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/raft/PartitionListener.java:
##########
@@ -573,11 +576,25 @@ private void
setCurrentGroupTopology(RaftGroupConfiguration config) {
@Override
public void onSnapshotSave(Path path, Consumer<Throwable> doneClo) {
+ onSnapshotSaveHandler.onSnapshotSave(snapshotInfo(), List.of(this))
+ .whenComplete((unused, throwable) ->
doneClo.accept(throwable));
+ }
+
+ private PartitionSnapshotInfo snapshotInfo() {
long maxAppliedIndex = max(storage.lastAppliedIndex(),
txStatePartitionStorage.lastAppliedIndex());
long maxAppliedTerm = max(storage.lastAppliedTerm(),
txStatePartitionStorage.lastAppliedTerm());
- onSnapshotSaveHandler.onSnapshotSave(maxAppliedIndex, maxAppliedTerm,
List.of(this))
- .whenComplete((unused, throwable) ->
doneClo.accept(throwable));
+ byte[] configuration =
storage.getStorage().committedGroupConfiguration();
+
+ assert configuration != null : "Trying to create a snapshot without
Raft group configuration";
+
+ return new PartitionSnapshotInfo(
+ maxAppliedIndex,
+ maxAppliedTerm,
+ storage.leaseInfo(),
+ configuration,
+ Set.of(storage.tableId())
Review Comment:
Could you please add javadoc to `PartitionSnapshotInfo#tableIds` that would
explain what these tables are and why we need them in the snapshot information?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]