-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Recovery based on only the last event #651
Conversation
@@ -137,23 +138,44 @@ private[r2dbc] class PostgresQueryDao(executorProvider: R2dbcExecutorProvider) e | |||
protected def selectOneEventSql(slice: Int): String = | |||
sqlCache.get(slice, "selectOneEventSql") { | |||
sql""" | |||
SELECT slice, entity_type, db_timestamp, $sqlDbTimestamp AS read_db_timestamp, event_ser_id, event_ser_manifest, event_payload, meta_ser_id, meta_ser_manifest, meta_payload, tags | |||
SELECT entity_type, db_timestamp, $sqlDbTimestamp AS read_db_timestamp, event_ser_id, event_ser_manifest, event_payload, meta_ser_id, meta_ser_manifest, meta_payload, tags |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removal of the slice
column in some selects is an unrelated cleanup. retrieve of slice is unnecessary since we already have the slice.
.map(_.map(row => deserializeSnapshotRow(row, serialization))) | ||
def loadAsync(persistenceId: String, criteria: SnapshotSelectionCriteria): Future[Option[SelectedSnapshot]] = { | ||
if (criteria.maxSequenceNr <= 0) | ||
FutureNone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optimization, it would otherwise query the db also for disabled snapshot criteria
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as soon as Akka bump is final 2.10.1 release
d1a01e2
to
fb42e10
Compare
Implementation of akka/akka#32629