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

feat(core): resume all suspended WAL tables on start up #4513

Merged
merged 6 commits into from
May 17, 2024

Conversation

ideoma
Copy link
Collaborator

@ideoma ideoma commented May 16, 2024

fixes #4013

Also periodically re-evaluates all unsuspended WAL tables to mitigate potential race condition of a table not being notified to ApplyWal2TableJob. This should eliminate issue found by fuzz test where a table is left unnotified without any errors:

java.lang.AssertionError: [-1] txn timed out [expectedTxn=21, writerTxn=-1
	at org.junit.Assert.fail(Assert.java:89)
	at io.questdb.test.cutlass.http.line.AbstractLineHttpFuzzTest.lambda$runTest$0(AbstractLineHttpFuzzTest.java:242)
	at io.questdb.test.tools.TestUtils.assertMemoryLeak(TestUtils.java:644)
	at io.questdb.test.cutlass.http.line.AbstractLineHttpFuzzTest.runTest(AbstractLineHttpFuzzTest.java:212)
	at io.questdb.test.cutlass.http.line.LineHttpReceiverFuzzTest.runTest(LineHttpReceiverFuzzTest.java:32)
	at io.questdb.test.cutlass.http.line.LineHttpReceiverFuzzTest.testAddConvertColumns(LineHttpReceiverFuzzTest.java:54)
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:566)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:299)
	at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:293)
	at java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.lang.Thread.run(Thread.java:829)

@bluestreak01 bluestreak01 self-requested a review May 17, 2024 14:25
@ideoma
Copy link
Collaborator Author

ideoma commented May 17, 2024

[PR Coverage check]

😍 pass : 34 / 38 (89.47%)

file detail

path covered line new line coverage
🔵 io/questdb/cairo/CairoEngine.java 0 1 00.00%
🔵 io/questdb/cairo/wal/seq/SeqTxnTracker.java 4 5 80.00%
🔵 io/questdb/griffin/ConvertOperatorImpl.java 4 5 80.00%
🔵 io/questdb/cairo/wal/CheckWalTransactionsJob.java 12 13 92.31%
🔵 io/questdb/PropServerConfiguration.java 2 2 100.00%
🔵 io/questdb/cairo/DefaultCairoConfiguration.java 1 1 100.00%
🔵 io/questdb/PropertyKey.java 1 1 100.00%
🔵 io/questdb/cairo/wal/ApplyWal2TableJob.java 5 5 100.00%
🔵 io/questdb/cairo/wal/seq/TableSequencerAPI.java 2 2 100.00%
🔵 io/questdb/cairo/TableWriter.java 2 2 100.00%
🔵 io/questdb/cairo/CairoConfigurationWrapper.java 1 1 100.00%

@bluestreak01 bluestreak01 merged commit 55638d0 into master May 17, 2024
25 checks passed
@bluestreak01 bluestreak01 deleted the feat-unsuspend-on-start branch May 17, 2024 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Attempt to resume all suspended WAL tables on start-up
2 participants