Skip to content
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

[Backport 5.4] row cache: do_update: abort on execute error #16256

Conversation

bhalevy
Copy link
Member

@bhalevy bhalevy commented Dec 1, 2023

Currently the cache updaters aren't exception safe
yet they are intended to be.

Instead of allowing exceptions from
external_updater::execute escape row_cache::update,
abort using on_fatal_internal_error.

Future changes should harden all execute implementations
to effectively make them noexcept, then the pure virtual
definition can be made noexcept to cement that.

\Fixes #15576

\Closes #15577

  • github.com:scylladb/scylladb:
    row_cache: abort on exteral_updater::execute errors
    row_cache: do_update: simplify _prev_snapshot_pos setup

(cherry picked from commit 4a0f164)

…y Halevy

Currently the cache updaters aren't exception safe
yet they are intended to be.

Instead of allowing exceptions from
`external_updater::execute` escape `row_cache::update`,
abort using `on_fatal_internal_error`.

Future changes should harden all `execute` implementations
to effectively make them `noexcept`, then the pure virtual
definition can be made `noexcept` to cement that.

\Fixes scylladb#15576

\Closes scylladb#15577

* github.com:scylladb/scylladb:
  row_cache: abort on exteral_updater::execute errors
  row_cache: do_update: simplify _prev_snapshot_pos setup

(cherry picked from commit 4a0f164)
@bhalevy bhalevy requested review from denesb and removed request for tgrabiec December 1, 2023 18:50
@scylladb-promoter
Copy link
Contributor

@avikivity
Copy link
Member

Is this fixing a regression?

@bhalevy
Copy link
Member Author

bhalevy commented Dec 3, 2023

Is this fixing a regression?

No, it was like that for ages.
But it hardens the release against rare, but severe cases where we might violate the row cache invariant, with low risk.

@bhalevy bhalevy changed the title [Backport 5.4] row cache: do update abort on execute error [Backport 5.4] row cache: do_update: abort on execute error Dec 3, 2023
@avikivity
Copy link
Member

Agree

avikivity pushed a commit that referenced this pull request Dec 3, 2023
…y Halevy

Currently the cache updaters aren't exception safe
yet they are intended to be.

Instead of allowing exceptions from
`external_updater::execute` escape `row_cache::update`,
abort using `on_fatal_internal_error`.

Future changes should harden all `execute` implementations
to effectively make them `noexcept`, then the pure virtual
definition can be made `noexcept` to cement that.

\Fixes #15576

\Closes #15577

* github.com:scylladb/scylladb:
  row_cache: abort on exteral_updater::execute errors
  row_cache: do_update: simplify _prev_snapshot_pos setup

(cherry picked from commit 4a0f164)

Closes #16256
@denesb
Copy link
Contributor

denesb commented Dec 4, 2023

Looks like next-5.4 was not triggered, by this merge.
@yaronkaikov

@yaronkaikov
Copy link
Contributor

Looks like next-5.4 was not triggered, by this merge. @yaronkaikov

@denesb looking into it

@yaronkaikov
Copy link
Contributor

@denesb Fixed. probably caused by the Jenkins issues we faced yesterday. going over all releases to make sure they are working

@bhalevy
Copy link
Member Author

bhalevy commented Dec 6, 2023

@denesb please merge

@denesb
Copy link
Contributor

denesb commented Dec 6, 2023

@denesb please merge

@bhalevy this was merged and promoted already.

@denesb denesb closed this Dec 6, 2023
denesb added a commit that referenced this pull request Dec 7, 2023
…y Halevy

Currently the cache updaters aren't exception safe
yet they are intended to be.

Instead of allowing exceptions from
`external_updater::execute` escape `row_cache::update`,
abort using `on_fatal_internal_error`.

Future changes should harden all `execute` implementations
to effectively make them `noexcept`, then the pure virtual
definition can be made `noexcept` to cement that.

\Fixes #15576

\Closes #15577

* github.com:scylladb/scylladb:
  row_cache: abort on exteral_updater::execute errors
  row_cache: do_update: simplify _prev_snapshot_pos setup

(cherry picked from commit 4a0f164)

Closes #16256
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.

None yet

5 participants