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

BATproject2: does not match always #7196

Closed
Aceeri opened this issue Nov 18, 2021 · 6 comments
Closed

BATproject2: does not match always #7196

Aceeri opened this issue Nov 18, 2021 · 6 comments
Labels
bug
Milestone

Comments

@Aceeri
Copy link

@Aceeri Aceeri commented Nov 18, 2021

Describe the bug

Heyo, I was trying to test some things to make our analytics stuff more stable. Basically I create a table, start a transaction on 2 clients, one alters the table to add a new column, the other client inserts some data. Instead of rolling back it ends up corrupting the table entirely it seems like?

I've read over the optimistic concurrency control so I'm not sure if this is actually a bug or expected behavior here.

To Reproduce

Client 1

sql>create table test (id bigint);
operation successful
sql>select * from test;
+----+
| id |
+====+
+----+
0 tuples
sql>start transaction;
auto commit mode: off
sql>alter table test add column data int; # To be clear this is run BEFORE the insert in the second client.
operation successful
sql>commit;
auto commit mode: on
sql>select * from test;
GDK reported error: BATproject2: does not match always

Client 2

sql>select * from test;
+----+
| id |
+====+
+----+
0 tuples
sql>start transaction;
auto commit mode: off
sql>insert into test values (1); # This is run AFTER the alter
1 affected row
sql>commit;
auto commit mode: on
sql>select * from test;
GDK reported error: BATproject2: does not match always

Expected behavior
I know this is a violation of the OCC rules on concurrent connections but wasn't expecting the table to not be recoverable afterwards.

Screenshots

Software versions
MonetDB: MonetDB Database Server Toolkit v11.41.11 (Jul2021-SP1)
OS: Linux 839c464b9757 5.10.0-8-cloud-amd64 #1 SMP Debian 5.10.46-4 (2021-08-03) x86_64 x86_64 x86_64 GNU/Linux
Using the docker image here: https://hub.docker.com/r/monetdb/monetdb

**Issue labeling **
Table corruption, concurrent transactions,

Additional context

@sjoerdmullender
Copy link
Member

@sjoerdmullender sjoerdmullender commented Nov 18, 2021

There is clearly a bug here. Neither client should report "BATproject2: does not match always".
I was able to reproduce by making sure both clients had started their transactions before the ALTER and INSERT queries were done.
In this case, there is going to be a conflict between the two transactions, so at least one of them should fail (I expect). So I think there is a problem handling this type of case.

@PedroTadim
Copy link
Contributor

@PedroTadim PedroTadim commented Nov 18, 2021

A dml dependency is missing I think. Let me test before and after my changes.

monetdb-team pushed a commit that referenced this issue Nov 18, 2021
@PedroTadim PedroTadim added the bug label Nov 19, 2021
@PedroTadim PedroTadim added this to the NEXTRELEASE milestone Nov 19, 2021
@sjoerdmullender sjoerdmullender removed this from the NEXTRELEASE milestone Dec 21, 2021
@sjoerdmullender sjoerdmullender added this to the Jul2021-SP2 milestone Dec 21, 2021
@bharaththam
Copy link

@bharaththam bharaththam commented Jul 25, 2022

hi Joe mullender ,

Is the BAT project2:doesnot match always is fixed in which version i need the version because we are facing lot issues and failures we need test upgrading it to the required verison

@bharaththam
Copy link

@bharaththam bharaththam commented Jul 25, 2022

hi pedrotadim
any comments in which verison it is used as i am unable to get the in any of the notes

@PedroTadim
Copy link
Contributor

@PedroTadim PedroTadim commented Jul 25, 2022

Hi! This error message is generally thrown due to an internal bug. You may be facing another bug. Can you make a reproducible test case?

@sjoerdmullender
Copy link
Member

@sjoerdmullender sjoerdmullender commented Jul 26, 2022

hi pedrotadim any comments in which verison it is used as i am unable to get the in any of the notes

We are experiencing nameserver resolution problems with our monetdb.org website where the release notes are normally available. The provider has not given an ETA for their fix of this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug
Projects
None yet
Development

No branches or pull requests

4 participants