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

Multiple Users report "table not found" errors when using Dolt under concurrency #8716

Open
timsehn opened this issue Jan 6, 2025 · 2 comments
Labels
bug Something isn't working concurrency Issues relating to concurrent access to Dolt no repro Bugs that can't be reproduced easily

Comments

@timsehn
Copy link
Contributor

timsehn commented Jan 6, 2025

User 1

  1. Simple table structure id primary key -> json map
  2. Tests do not fail with no concurrency.
  3. Tests fail with concurrency with table not found error
  4. Java, Spring framework to accept http requests and perform backend logic, (Hibernate is used for some metadata tables), JDBC for connecting to dolt: most queries are issued using JDBC directly (e.g., JdbcTemplate::query or JdbcTemplate::execute)
  5. Both read and write queries (e.g., checking if an element is already in the DB before inserting)
  6. A single table is used where the elements are stored. We also have a metadata table that maps commit ids in our system to dolt commit hashes. This is updated once per commit. In our failing tests, ~5000 commits were issued with different changes (new elements, modifications, deleting elements).
  7. dolt commits are used (see above); the metadata table is stored on a separate dolt branch (but commits are not created in this metadata branch, it is only used to separate real data from our metadata), dolt features are used via SQL functions (e.g., CALL dolt_commit(...);)

User 2

  1. Used mydumper to dump a large database
  2. Using default myloader configuration that uses 4 threads to load.
  3. myloader fails with table not found error. Different table each time.
@timsehn
Copy link
Contributor Author

timsehn commented Jan 6, 2025

I was able to round trip this database:

https://www.dolthub.com/repositories/dolthub/transparency-in-pricing

With mydumper/myloader with default concurrency settings.

This makes me think it may be related to json/text columns as here is the table User 2 is trying to import:

CREATE TABLE `tablename` (
  `replaced` bigint NOT NULL AUTO_INCREMENT,
  `replaced` datetime DEFAULT NULL,
  `replaced` datetime DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` datetime DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` bit(1) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` datetime DEFAULT NULL,
  `replaced` varchar(255) DEFAULT NULL,
  `replaced` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` bit(1) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` bit(1) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(100) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` bit(1) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` bit(1) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` bit(1) DEFAULT NULL,
  `replaced` datetime DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` varchar(50) NOT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` datetime DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` longtext,
  `replaced` longtext,
  `replaced` longtext,
  `replaced` bit(1) NOT NULL,
  `replaced` longtext,
  `replaced` bit(1) NOT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(30) DEFAULT NULL,
  `replaced` varchar(30) DEFAULT NULL,
  `replaced` varchar(30) DEFAULT NULL,
  `replaced` varchar(30) DEFAULT NULL,
  `replaced` varchar(30) DEFAULT NULL,
  `replaced` decimal(19,6) DEFAULT NULL,
  `replaced` decimal(19,6) DEFAULT NULL,
  `replaced` decimal(19,6) DEFAULT NULL,
  `replaced` decimal(19,6) DEFAULT NULL,
  `replaced` decimal(19,6) DEFAULT NULL,
  `replaced` decimal(19,6) DEFAULT NULL,
  `replaced` decimal(19,6) DEFAULT NULL,
  `replaced` decimal(19,6) DEFAULT NULL,
  `replaced` decimal(19,6) DEFAULT NULL,
  `replaced` decimal(19,6) DEFAULT NULL,
  `replaced` decimal(19,6) DEFAULT NULL,
  `replaced` decimal(19,6) DEFAULT NULL,
  `replaced` decimal(19,6) DEFAULT NULL,
  `replaced` decimal(19,6) DEFAULT NULL,
  `replaced` decimal(19,6) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `replaced` bit(1) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` datetime DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` bit(1) NOT NULL DEFAULT '0',
  `replaced` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `replaced` bit(1) NOT NULL DEFAULT '0',
  `replaced` datetime DEFAULT NULL,
  `replaced` varchar(50) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` bit(1) NOT NULL DEFAULT '0',
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` bit(1) NOT NULL DEFAULT '0',
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `replaced` datetime DEFAULT NULL,
  `replaced` double NOT NULL DEFAULT '0',
  `replaced` double NOT NULL DEFAULT '0',
  `replaced` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `replaced` bit(1) NOT NULL DEFAULT '0',
  `replaced` double NOT NULL DEFAULT '0',
  `replaced` double NOT NULL DEFAULT '0',
  `replaced` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `replaced` double NOT NULL DEFAULT '0',
  `replaced` double NOT NULL DEFAULT '0',
  `replaced` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `replaced` double NOT NULL DEFAULT '0',
  `replaced` double NOT NULL DEFAULT '0',
  `replaced` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `replaced` double NOT NULL DEFAULT '0',
  `replaced` double NOT NULL DEFAULT '0',
  `replaced` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `replaced` double NOT NULL DEFAULT '0',
  `replaced` double NOT NULL DEFAULT '0',
  `replaced` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `replaced` bit(1) NOT NULL DEFAULT '0',
  `replaced` datetime DEFAULT NULL,
  `replaced` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `replaced` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` decimal(19,2) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` varchar(10) DEFAULT NULL,
  `replaced` double DEFAULT NULL,
  `replaced` double NOT NULL DEFAULT '0',
  `replaced` varchar(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `replaced` (`transaction_uuid`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`),
  KEY `replaced` (`replaced`)
) ENGINE=InnoDB AUTO_INCREMENT=166634587 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci

@timsehn timsehn added bug Something isn't working concurrency Issues relating to concurrent access to Dolt no repro Bugs that can't be reproduced easily labels Jan 7, 2025
@jycor
Copy link
Contributor

jycor commented Jan 14, 2025

At least in the mydumper/myloader case, there seems to be an issue related to different connections creating and inserting into the table. Specifically, autocommit = 0 prevents one connection from seeing transactions from other connections (even after commiting)

Repro:
Start a fresh dolt server with no tables. Connect to it with two different connections.

In one terminal:

tmp/main> set session autocommit = 0;
tmp/main> create table t (i int);
tmp/main*> commit;

In another terminal:

tmp2/main> set session autocommit = 0;
tmp2/main> insert into t values (1);
Error 1146 (HY000): table not found: t
tmp2/main> set session autocommit = 1;
tmp2/main*> insert into t values (1);
Empty set (0.00 sec)

tmp2/main*> select * from t;
+---+
| i |
+---+
| 1 |
+---+
1 row in set (0.00 sec)

When autocommit is reenabled, we receive updates from the other connection and we are able to insert.

In MySQL, autocommit appears to have no impact on whether or not the current session can see committed transactions from other connections. I am currently working through this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working concurrency Issues relating to concurrent access to Dolt no repro Bugs that can't be reproduced easily
Projects
None yet
Development

No branches or pull requests

2 participants