Add comment and warning for MySQL repeatable read #518
Test Results
130 files ±0 130 suites ±0 4m 6s ⏱️ + 1m 4s
789 tests ±0 789 ✅ ±0 0 💤 ±0 0 ❌ ±0
915 runs ±0 909 ✅ ±0 6 💤 ±0 0 ❌ ±0
Results for commit de18cb3c. ± Comparison against base commit a4030393.
[test-results]:data:application/gzip;base64,H4sIAD4b4moC/13MSw7CIBSF4a00jB3wEAQ3Y+ACCbEthsfIuHeplgYd/t9JzhP5MLuMrhNh+DShXEMZ0takS4hrA3oWDdpYtvkiVa9brgD/dA+PRvgAr8P8Ay6lmHZJdd0+FeF79EuF1SHfR9F7OPz0+AdxWUJpgawjEgwDqigjVgInxlgPzhAMXGLBqcYGpEOvN0g+R9wJAQAA
:recycle: This comment has been updated with latest results.
I would refuse to start. Like driving on a bald tire ( mandatory car ananlogy) and protect the user from themselves.
I would refuse to start. Like driving on a bald tire ( mandatory car ananlogy) and protect the user from themselves.
Sure - the less interrupting scenario here is that we could set the transaction isolation level ourselves, but such changes are highly affecting. If we include a "do it anyway", I could get on board with that.
I question making such a big change without the administrator being involved. Channels _could_ be relying upon repeatable read for correctness.
> I would refuse to start. Like driving on a bald tire ( mandatory car ananlogy) and protect the user from themselves.
> Sure - the less interrupting scenario here is that we could set the transaction isolation level ourselves, but such changes are highly affecting. If we include a "do it anyway", I could get on board with that.
> I question making such a big change without the administrator being involved. Channels _could_ be relying upon repeatable read for correctness.
maybe for fresh installs do a hard stop?
maybe for fresh installs do a hard stop?
That could work. Sure. Updated.
The check doesn’t match its message. Both checks only reject REPEATABLE_READ, but the messages say READ-COMMITTED is required. SERIALIZABLE, which locks even more, gets through with no block and no warning. The fix is to test for “not READ_COMMITTED” instead.
The check doesn’t match its message. Both checks only reject REPEATABLE_READ, but the messages say READ-COMMITTED is required. SERIALIZABLE, which locks even more, gets through with no block and no warning. The fix is to test for “not READ_COMMITTED” instead.
This is intentional, but I'm open to other phrasing of the message.
A DBA may reasonably configure the system away from READ_COMMITTED - the problem is that the default for MySQL is REPEATABLE_READ, so people are unintentionally running with REPEATABLE_READ. There's not a reasonable way I've found to check that the transaction isolation level is configured away from the default explicitly - which leaves checking for the default.
private static final Logger logger = LogManager.getLogger(this.getClass());
private final AtomicBoolean hasCheckedTransactionIsolation = new AtomicBoolean(false);
if (!hasCheckedTransactionIsolation.compareAndSet(false, true)) {
return;
}
A few minor things suggested inline, but, otherwise, looks good to me. Those were supposed to be part of the same review, but I guess I clicked the wrong button.
Could you also please create the release note and put it in the PR description?
@NicoPiel, I changed the phrasing of the message.
Approved these changes.
Looks safe to merge.
NicoPiel
mgaffigan
Running MySQL at the default REPEATABLE_READ transaction isolation level causes hangs and errors throughout the application when running at load. These were frequently the cause of flaky tests in #449, and have issues open in the nextgen repo.
Add a warning to startup to check for misconfigured instances, and update the instructions in mirth.properties to have the correct transaction isolation level.
Release note: