Skip to content

Conversation

@rautenrieth-da
Copy link
Contributor

Fixes #2456

@rautenrieth-da rautenrieth-da force-pushed the rautenrieth-da/incremental-acs-snapshots branch 3 times, most recently from 5f293c9 to cf930a7 Compare January 29, 2026 13:41
[ci]

Signed-off-by: Robert Autenrieth <robert.autenrieth@digitalasset.com>
[ci]

Signed-off-by: Robert Autenrieth <robert.autenrieth@digitalasset.com>
Signed-off-by: Robert Autenrieth <robert.autenrieth@digitalasset.com>
[ci]

Signed-off-by: Robert Autenrieth <robert.autenrieth@digitalasset.com>
[ci]

Signed-off-by: Robert Autenrieth <robert.autenrieth@digitalasset.com>
[ci]

Signed-off-by: Robert Autenrieth <robert.autenrieth@digitalasset.com>
[ci]

Signed-off-by: Robert Autenrieth <robert.autenrieth@digitalasset.com>
[ci]

Signed-off-by: Robert Autenrieth <robert.autenrieth@digitalasset.com>
@rautenrieth-da rautenrieth-da force-pushed the rautenrieth-da/incremental-acs-snapshots branch from cf930a7 to 97db5bc Compare January 29, 2026 14:02
@rautenrieth-da rautenrieth-da marked this pull request as ready for review January 29, 2026 17:45
Copy link
Contributor

@OriolMunoz-da OriolMunoz-da left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! looking good, the only really blocking comment is the advisory lock one

Also, for testing, should we run https://github.com/DACH-NY/canton-network-node/issues/17033 on cilr after a while? (and ideally before this is merged, for a sanity check...)

val now = context.clock.now

// Next, make sure we don't process too little.
if (now.isBefore(updateUntil)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to have: a test checking this logic, or extract this in a separate method to easy unit test

-- In production, we have a separate table for each scan instance so this
-- column will be the same for all rows. However, in tests we can have multiple
-- scan instances writing to the same table, so we need to include it.
history_id bigint not null references update_history_descriptors (id),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This table and the backfil one should have a foreign key to the acs_incremental_snapshot table, as discussed

targetRecordTime = now.minusSeconds(1800L),
)
previousIncrementalSnapshot(snapshot)
updatesBetween(currentMigrationId, now.minusSeconds(6000L), now.minusSeconds(1L))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe some more constants in these tests as we talked about, if that makes it easier to understand.

Copy link
Contributor

@ray-roestenburg-da ray-roestenburg-da left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, in the right direction, main thing that you discovered during our chat, to handle the import updates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incremental update of ACS snapshot in AcsSnapshotTrigger

4 participants