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

schema::describe: print 'synchronous_updates' only if it was specified #14925

Closed
wants to merge 1 commit into from

Conversation

Jadw1
Copy link
Contributor

@Jadw1 Jadw1 commented Aug 2, 2023

While describing materialized view, print synchronous_updates option only if the tag is present in schema's extensions map. Previously if the key wasn't present, the default (false) value was printed.

Fixes: #14924
Refers: https://github.com/scylladb/scylla-dtest/issues/3324

While describing materialized view, print `synchronous_updates` option
only if the tag is present in schema's extensions map. Previously if the
key wasn't present, the default (false) value was printed.

Fixes: scylladb#14924
@Jadw1 Jadw1 requested review from tgrabiec and nyh as code owners August 2, 2023 10:00
@github-actions github-actions bot deleted a comment from aws-amplify-us-east-2 bot Aug 2, 2023
@Jadw1 Jadw1 requested a review from bhalevy August 2, 2023 10:02

return *tag_opt == "true";
static std::optional<std::string> is_update_synchronously_view(const schema& s) {
return db::find_tag(s, db::SYNCHRONOUS_VIEW_UPDATES_TAG_KEY);
Copy link
Member

Choose a reason for hiding this comment

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

I think that open-coding this in the call site might be clearer.
If you still want to wrap it, I'd rename the function accordingly, e.g. get_update_synchronously_view_opt.

@Jadw1
Copy link
Contributor Author

Jadw1 commented Aug 2, 2023

@bhalevy By accident I've created this PR from my repo clone's master, I'll close this one and open new from a separate branch and without this unnecessary wrapping function

@Jadw1 Jadw1 closed this Aug 2, 2023
@scylladb-promoter
Copy link
Contributor

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.

schema::describe: print synchronous_updates only when it's present in extension map
3 participants