Skip to content

Conversation

@youen
Copy link
Collaborator

@youen youen commented Nov 27, 2025

No description provided.

@youen youen force-pushed the auto-commit-after-timeout branch from 7fb6112 to 05e938c Compare December 1, 2025 21:32
@youen youen marked this pull request as ready for review December 1, 2025 21:37
@youen youen requested a review from adrienaury December 1, 2025 21:37
Copy link
Member

@adrienaury adrienaury left a comment

Choose a reason for hiding this comment

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

OK to publish a "-beta1" version for now

Comment on lines -66 to 106

committed := make([]Row, 0, commitSize)

// Handle savepoint on exit
defer func() {
if savepointPath != "" {
if err := savepoint(savepointPath, committed); err != nil {
log.Error().Msgf("Savepoint failure, %d lines committed unsaved", len(committed))
for _, unsaved := range committed {
if ctx.cfg.SavepointPath != "" {
if err := savepoint(ctx.cfg.SavepointPath, ctx.committed); err != nil {
log.Error().Msgf("Savepoint failure, %d lines committed unsaved", len(ctx.committed))
for _, unsaved := range ctx.committed {
log.Warn().Interface("value", unsaved).Msg("Unsaved committed value")
}
}
}
}()
Copy link
Member

Choose a reason for hiding this comment

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

I see commited variable was moved under the ctx execution context.

What happen if the ctx.Run method is called multiple times ? can it create problems because commited var is not cleaned betweens multiples calls ? does it happens ?

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.

3 participants