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

[Bug] OutOfOrderSequenceException may be thrown when write to primary key table #230

Open
1 of 2 tasks
luoyuxia opened this issue Dec 20, 2024 · 2 comments · May be fixed by #238
Open
1 of 2 tasks

[Bug] OutOfOrderSequenceException may be thrown when write to primary key table #230

luoyuxia opened this issue Dec 20, 2024 · 2 comments · May be fixed by #238
Assignees
Labels
bug Something isn't working component=kv
Milestone

Comments

@luoyuxia
Copy link
Collaborator

luoyuxia commented Dec 20, 2024

Search before asking

  • I searched in the issues and found nothing similar.

Fluss version

0.5.0

Minimal reproduce step

Add a test in FlussTableITCase

   @Test
    void testPut() throws Exception {
        createTable(DATA1_TABLE_PATH_PK, DATA1_TABLE_INFO_PK.getTableDescriptor(), false);
        Table table = conn.getTable(DATA1_TABLE_PATH_PK);

        TableDescriptor tableDescriptor = table.getDescriptor();
        UpsertWriter upsertWriter = table.getUpsertWriter();

        InternalRow row =
                compactedRow(tableDescriptor.getSchema().toRowType(), new Object[] {1, "2"});
        upsertWriter.delete(row);
        upsertWriter.flush();

        upsertWriter.upsert(row).get();
    }

What doesn't meet your expectations?

It shouldn't throw excpetion in the second put although the first deletion delete nothing

Anything else?

  • In the first put with batch sequence, it delete a non-exist key, no binlog is generated which will cause skipping to append to log, so the currently sequene id is still -1;
  • In the second put with batch sequence 1, it'll then append to the log, which cause sequene not continuous. So the exception is thrown

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@luoyuxia luoyuxia added bug Something isn't working component=kv labels Dec 20, 2024
@wuchong wuchong added this to the v0.6 milestone Dec 20, 2024
@JNSimba
Copy link
Contributor

JNSimba commented Dec 20, 2024

Please assign it to me, thanks

@luoyuxia
Copy link
Collaborator Author

@JNSimba Sorry.. I'm working on this.. Thanks for your attention.. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component=kv
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants