[CONJ-512] Concurrent modification detected error Created: 2017-08-23 Updated: 2017-08-28 Resolved: 2017-08-28 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | JDBC 4.2 compatibility |
| Affects Version/s: | 2.1.0 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Blocker |
| Reporter: | paladox | Assignee: | Diego Dupin |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
mac osx 10.12.5 |
||
| Description |
|
Hi, since updating to mariadb 2.1.0 connector, i have experienced this "Concurrent modification detected" error in the gerrit project https://www.gerritcodereview.com Downgrading back to 2.0.3 fixes the problem. Seems that a bug may have been introduced into 2.1.0. Im using mariadb server 10.2 from homebrew. |
| Comments |
| Comment by Diego Dupin [ 2017-08-23 ] |
|
Can you provide some additional informations :
|
| Comment by Diego Dupin [ 2017-08-23 ] |
|
No need to other informations, i found the issue. Has JDBC executeBatch required, the int[] result can contain :
in 2.1.0 version, driver will use a new protocol with server bulk protocol for batch insert when possible. (batch without Statement.RETURN_GENERATED_KEYS and streams) to have much faster batch when server MariaDB >= 10.2.7. According to environment, this can be 10 times faster. Hibernate do that sort of check too : https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/jdbc/Expectations.java#L58 but check -2 (SUCCESS_NO_INFO) and -3 (EXECUTE_FAILED) values. This new "bulk" functionality can be disabled setting option "useBulkStmts" to false. |
| Comment by paladox [ 2017-08-23 ] |
|
Could the new bulk be disabled by default instead please? |
| Comment by Diego Dupin [ 2017-08-28 ] |
|
This is an efficient way to handle batch that correspond to standard. I've submit a gerrit issue : https://bugs.chromium.org/p/gerrit/issues/detail?id=7105 |