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

Support adding and satisfying a constraint in the same txn #4948

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

morgando
Copy link
Contributor

@morgando morgando commented Jan 6, 2025

No description provided.

Copy link

@roborivers roborivers left a comment

Choose a reason for hiding this comment

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

Coding style check: Error. ⚠.
Smoke testing: Success ✓.
Cbuild submission: Error ⚠.
Regression testing: 305/598 tests failed ⚠.

The first 10 failing tests are:
odh_blobs [setup failure]
unionpar_maxqueue [setup failure]
sc_truncate_multiddl_generated [setup failure]
sc_inserts_logicalsc_generated [setup failure]
phys_rep_perf
online_compaction
timepart_trunc_serialsc_generated
timepart_trunc_multiddl_generated
timepart_trunc
constraints_partial_index_off_generated

@morgando morgando force-pushed the tran-foreign-keys branch 6 times, most recently from ed93701 to abd9c36 Compare January 7, 2025 18:10
Copy link

@roborivers roborivers left a comment

Choose a reason for hiding this comment

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

Coding style check: Error. ⚠.
Smoke testing: Success ✓.
Cbuild submission: Error ⚠.
Regression testing: 193/597 tests failed ⚠.

The first 10 failing tests are:
sc_inserts_logicalsc_generated [setup failure]
sc_newuniq [setup failure]
writes_remsql_fdbpushredirect_generated [setup failure]
sorese_tran [setup failure]
sc_transactional_rowlocks_generated
phys_rep_perf
analyze_exit_immediately
timepart_trunc_serialsc_generated
timepart_trunc_multiddl_generated
timepart_trunc

@morgando morgando changed the title Support adding a constraint in a txn that gets satisfied in the same txn Support adding and satisfying a constraint in the same txn Jan 7, 2025
@morgando morgando force-pushed the tran-foreign-keys branch 9 times, most recently from 611ee1b to 65df3c7 Compare January 13, 2025 21:36
@morgando morgando force-pushed the tran-foreign-keys branch 4 times, most recently from 554a0b1 to 7d9a531 Compare January 30, 2025 16:50
mponomar and others added 2 commits January 30, 2025 18:03
Signed-off-by: Michael Ponomarenko <[email protected]>

Support adding and satisfying constraint in same txn on replicant

Signed-off-by: Morgan Douglas <[email protected]>

Tweak replicant impl

Signed-off-by: Morgan Douglas <[email protected]>

Tweak repl impl

Signed-off-by: Morgan Douglas <[email protected]>

Tweak repl impl

Signed-off-by: Morgan Douglas <[email protected]>

Refactor master impl for supporting adding+satisfying constraint in the same txn

Signed-off-by: Morgan Douglas <[email protected]>

Refactor

Signed-off-by: Morgan Douglas <[email protected]>

Refactor

Signed-off-by: Morgan Douglas <[email protected]>

Refactor

Signed-off-by: Morgan Douglas <[email protected]>

Refactor

Signed-off-by: Morgan Douglas <[email protected]>

Refactor

Signed-off-by: Morgan Douglas <[email protected]>

Refactor

Signed-off-by: Morgan Douglas <[email protected]>

Tweak impl

Signed-off-by: Morgan Douglas <[email protected]>

Tweak impl

Signed-off-by: Morgan Douglas <[email protected]>

Tweak impl

Signed-off-by: Morgan Douglas <[email protected]>

Tweak impl

Signed-off-by: Morgan Douglas <[email protected]>

Tweak impl

Signed-off-by: Morgan Douglas <[email protected]>

Tweak impl

Signed-off-by: Morgan Douglas <[email protected]>

Tweak impl

Signed-off-by: Morgan Douglas <[email protected]>

Tweak impl

Signed-off-by: Morgan Douglas <[email protected]>

Address bug

in a txn
(1) constraint is added
(2) constraint is satisfied with an alter
during the scdone step for (2), replicants will
assume that, since there is a constraint pointing to
the table getting altered, the target key
must have existed in the table before it got altered.

This was previously a sound assumption because it was not possible
to first add a constraint before satisfying it in the same transaction,
which is the only case where this can validly occur.

The changes in this commit 'pass' the compatibility check if
we can't find the key that we're trying to validate in the
pre-alter dbtable.

TODO: make sure other compatibility checks in ondisk_schema_change aren't buggy.

Signed-off-by: Morgan Douglas <[email protected]>

Tweak impl

Signed-off-by: Morgan Douglas <[email protected]>

Refactor

Signed-off-by: Morgan Douglas <[email protected]>

Tweak impl

Signed-off-by: Morgan Douglas <[email protected]>

Refactor

Signed-off-by: Morgan Douglas <[email protected]>

Tweak impl

Signed-off-by: Morgan Douglas <[email protected]>

Tweak impl

Signed-off-by: Morgan Douglas <[email protected]>

Remove redundant fn call

Signed-off-by: Morgan Douglas <[email protected]>

Tweak impl

Signed-off-by: Morgan Douglas <[email protected]>

Tweak impl

Signed-off-by: Morgan Douglas <[email protected]>

Tweak impl

Signed-off-by: Morgan Douglas <[email protected]>

Tweak impl

Signed-off-by: Morgan Douglas <[email protected]>

Determine if table was rebuilt

Signed-off-by: Morgan Douglas <[email protected]>

Fix

Signed-off-by: Morgan Douglas <[email protected]>

Cleanup

Signed-off-by: Morgan Douglas <[email protected]>

Update comment

Signed-off-by: Morgan Douglas <[email protected]>

Update comment

Signed-off-by: Morgan Douglas <[email protected]>

Cleanup

Signed-off-by: Morgan Douglas <[email protected]>

Fix bug

Signed-off-by: Morgan Douglas <[email protected]>

Fix bug

Signed-off-by: Morgan Douglas <[email protected]>
Signed-off-by: Morgan Douglas <[email protected]>

Tweak test

Signed-off-by: Morgan Douglas <[email protected]>

Tweak test

Signed-off-by: Morgan Douglas <[email protected]>

Tweak tests

Signed-off-by: Morgan Douglas <[email protected]>

Teak tests

Signed-off-by: Morgan Douglas <[email protected]>

Tweak tests

Signed-off-by: Morgan Douglas <[email protected]>

Tweak tests

Signed-off-by: Morgan Douglas <[email protected]>

Tweak tests

Signed-off-by: Morgan Douglas <[email protected]>

Tweak tests

Signed-off-by: Morgan Douglas <[email protected]>

Tweak tests

Signed-off-by: Morgan Douglas <[email protected]>

Tweak tests

Signed-off-by: Morgan Douglas <[email protected]>

Tweak tests

Signed-off-by: Morgan Douglas <[email protected]>

Tweak tests

Signed-off-by: Morgan Douglas <[email protected]>

Tweak tests

Signed-off-by: Morgan Douglas <[email protected]>

Tweak tests

Signed-off-by: Morgan Douglas <[email protected]>

Tweak tests

Signed-off-by: Morgan Douglas <[email protected]>

Tweak tests

Signed-off-by: Morgan Douglas <[email protected]>

Remove dummy test

Signed-off-by: Morgan Douglas <[email protected]>

Update test

Signed-off-by: Morgan Douglas <[email protected]>

Fix test

Signed-off-by: Morgan Douglas <[email protected]>
@morgando morgando marked this pull request as ready for review January 31, 2025 16:24
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