Skip to content

Align snapshot stores and engines with renewed loading API - #814

Merged
smcvb merged 1 commit into
mainfrom
feature/snapshot-candidates
Dec 1, 2026
Merged

smcvb merged 1 commit into
mainfrom
feature/snapshot-candidates

Conversation

@hjohn

@hjohn hjohn commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor
  • PostgresqlSnapshotStore and PostgresqlEventStorageEngine load a snapshot for a list of SnapshotQuerys (names plus acceptable versions) in a single query, returning the name it was found under.
  • The engine's single-query source-with-snapshot path takes the snapshot queries too, and emits the snapshot with the name it was found under.
  • MultiTenantSnapshotStore routes these loads, including an aggregate-based query, to the tenant's store.
  • The Axon Server engine, its snapshotted sourcing stream and the multi-tenancy test engine also create SnapshotEventMessage with the name the snapshot was requested under, so every snapshot message carries its snapshot type.
  • The previous single-name loads stay, without @Override, so Axon Framework can remove its deprecated bridge first.

Depends on AxonIQ/AxonFramework#5196, which adds the snapshot query API; this won't compile against Axon Framework main until that is merged.

This PR should be back ported to axoniq-5.4.x once approved and merged.

@smcvb smcvb added Priority 1: Must Highest priority. A release cannot be made if this issue isn’t resolved. Type: Bug Use to signal issues that describe a bug within the system. labels Nov 24, 2026
@smcvb smcvb added this to the Release 5.5.0 milestone Nov 24, 2026
@smcvb smcvb added Type: Enhancement Use to signal an issue enhances an already existing feature of the project. and removed Type: Bug Use to signal issues that describe a bug within the system. labels Nov 24, 2026
@smcvb

smcvb commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Although strictly an enhancement, marked as a bug since this functionality is currently blocking users migrating their snapshots from AF4 into AF5.

@hjohn
hjohn marked this pull request as ready for review December 1, 2026 12:55
@hjohn
hjohn requested a review from a team as a code owner December 1, 2026 12:55
@hjohn
hjohn requested review from MateuszNaKodach, schananas and smcvb and removed request for a team December 1, 2026 12:55
@hjohn
hjohn force-pushed the feature/snapshot-candidates branch from e75ee8b to c14b38f Compare December 1, 2026 13:07
@hjohn hjohn changed the title Load Postgres snapshots by candidate name and acceptable versions Load Postgres snapshots by name and acceptable versions Dec 1, 2026
@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Build status (run 46675170893, commit 0d4ed53)

JDK 21 - SUCCESS - 33 modules (0 cached, 33 built) in 22:28

Per-module details
ModuleCacheTime
✅ axoniq-frameworkbuilt00:00
✅ axoniq-test-loggingbuilt00:01
✅ axoniq-framework-parentbuilt00:01
✅ axoniq-framework-bombuilt00:00
✅ axoniq-postgresqlbuilt00:53
✅ axoniq-distributed-messagingbuilt00:08
✅ axoniq-testcontainerbuilt00:34
✅ axon-server-connectorbuilt01:49
✅ axoniq-springcloudbuilt00:14
✅ axoniq-dead-letterbuilt00:23
✅ axoniq-event-streamingbuilt00:16
✅ axoniq-multi-tenancybuilt00:18
✅ axoniq-workflow-parentbuilt00:00
✅ axoniq-workflow-enginebuilt00:29
✅ axoniq-tracing-micrometerbuilt00:04
✅ axoniq-workflow-dslbuilt00:02
✅ axoniq-workflow-testbuilt00:09
✅ axoniq-framework-springbuilt00:00
✅ axoniq-spring-boot-autoconfigurebuilt01:40
✅ axoniq-spring-boot-starterbuilt00:00
✅ axoniq-integrationtestsbuilt00:00
✅ axoniq-integrationtests-supportbuilt00:00
✅ axoniq-integrationtests-connectorbuilt00:00
✅ axoniq-integrationtests-conformancebuilt04:21
✅ axoniq-integrationtests-tracingbuilt00:08
✅ axoniq-integrationtests-dead-letterbuilt00:03
✅ axoniq-legacybuilt03:15
✅ axoniq-integrationtests-legacybuilt00:07
✅ axoniq-integrationtests-workflowbuilt00:35
✅ axoniq-legacy-testbuilt00:07
✅ axoniq-message-transformationbuilt00:06
✅ axoniq-workflow-dsl-kotlinbuilt00:13
✅ axoniq-docs-samplesbuilt00:06

JDK 25 - SUCCESS - 33 modules (0 cached, 33 built) in 21:44

Per-module details
ModuleCacheTime
✅ axoniq-frameworkbuilt00:00
✅ axoniq-test-loggingbuilt00:01
✅ axoniq-framework-parentbuilt00:01
✅ axoniq-framework-bombuilt00:00
✅ axoniq-postgresqlbuilt00:51
✅ axoniq-distributed-messagingbuilt00:09
✅ axoniq-testcontainerbuilt00:35
✅ axon-server-connectorbuilt01:49
✅ axoniq-springcloudbuilt00:14
✅ axoniq-dead-letterbuilt00:24
✅ axoniq-event-streamingbuilt00:16
✅ axoniq-multi-tenancybuilt00:18
✅ axoniq-workflow-parentbuilt00:00
✅ axoniq-workflow-enginebuilt00:31
✅ axoniq-tracing-micrometerbuilt00:04
✅ axoniq-workflow-dslbuilt00:02
✅ axoniq-workflow-testbuilt00:09
✅ axoniq-framework-springbuilt00:00
✅ axoniq-spring-boot-autoconfigurebuilt01:40
✅ axoniq-spring-boot-starterbuilt00:00
✅ axoniq-integrationtestsbuilt00:00
✅ axoniq-integrationtests-supportbuilt00:01
✅ axoniq-integrationtests-connectorbuilt00:00
✅ axoniq-integrationtests-conformancebuilt03:44
✅ axoniq-integrationtests-tracingbuilt00:08
✅ axoniq-integrationtests-dead-letterbuilt00:03
✅ axoniq-legacybuilt03:15
✅ axoniq-integrationtests-legacybuilt00:06
✅ axoniq-integrationtests-workflowbuilt00:34
✅ axoniq-legacy-testbuilt00:07
✅ axoniq-message-transformationbuilt00:05
✅ axoniq-workflow-dsl-kotlinbuilt00:16
✅ axoniq-docs-samplesbuilt00:04

@smcvb

smcvb commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Although strictly an enhancement, marked as a bug since this functionality is currently blocking users migrating their snapshots from AF4 into AF5.

@smcvb smcvb added Type: Bug Use to signal issues that describe a bug within the system. and removed Type: Enhancement Use to signal an issue enhances an already existing feature of the project. labels Dec 1, 2026

@smcvb smcvb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Two nits, otherwise looks good. Preemptively approving anticipating both to be resolved accordingly.

@smcvb smcvb changed the title Load Postgres snapshots by name and acceptable versions Align PostgreSQL and Multi-Tenant SnapshotStore with renewed loading API Dec 1, 2026
@hjohn
hjohn force-pushed the feature/snapshot-candidates branch from c14b38f to 8a8a091 Compare December 1, 2026 14:26

@smcvb smcvb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

My concerns have been addressed, hence I'm approving this pull request.

@hjohn
hjohn force-pushed the feature/snapshot-candidates branch from 509e1b1 to 0d4ed53 Compare December 1, 2026 15:06
@hjohn hjohn changed the title Align PostgreSQL and Multi-Tenant SnapshotStore with renewed loading API Align snapshot stores and engines with renewed loading API Dec 1, 2026

@smcvb smcvb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Still think this looks fine.

@smcvb
smcvb merged commit c1a5c93 into main Dec 1, 2026
6 of 8 checks passed
@smcvb
smcvb deleted the feature/snapshot-candidates branch December 1, 2026 15:58
@smcvb

smcvb commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

/backport axoniq-5.4.x

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Backport failed for axoniq-5.4.x, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin axoniq-5.4.x
git worktree add -d .worktree/backport-814-to-axoniq-5.4.x origin/axoniq-5.4.x
cd .worktree/backport-814-to-axoniq-5.4.x
git switch --create backport-814-to-axoniq-5.4.x
git cherry-pick -x 0d4ed532d628e5b5a26514bd8a8021832dc8a563

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

The backport to axoniq-5.4.x failed. The reason, such as a cherry-pick conflict or a file missing on the target branch, is in the log of the Backport step: https://github.com/AxonIQ/axoniq-framework/actions/runs/46685758870

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

Labels

Priority 1: Must Highest priority. A release cannot be made if this issue isn’t resolved. Type: Bug Use to signal issues that describe a bug within the system.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants