-
Notifications
You must be signed in to change notification settings - Fork 910
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
ARTEMIS-4065 Non Persistent Page Counters #4265
Conversation
I stil have both versions of the counters in the codebase. I am going to remove the other implementation of the PageCounter and only keep the non persistent. This PR is for a draft only.. and I will finish after fixing the testsuite (the built server would work fine though) |
...java/org/apache/activemq/artemis/core/paging/cursor/impl/NonPersistentPagingCounterImpl.java
Outdated
Show resolved
Hide resolved
9826735
to
e994c51
Compare
7320153
to
21e2942
Compare
I updated this PR with a new commit. From now on we save snapshots of the counter upon shutdown. |
8116f5c
to
e289d3f
Compare
b6b84d6
to
53d5d26
Compare
artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SizeAwareMetric.java
Outdated
Show resolved
Hide resolved
artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SizeAwareMetric.java
Outdated
Show resolved
Hide resolved
artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SizeAwareMetric.java
Outdated
Show resolved
Hide resolved
artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/PagingManager.java
Outdated
Show resolved
Hide resolved
...-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/PageCursorProvider.java
Outdated
Show resolved
Hide resolved
...main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageCounterRebuildManager.java
Outdated
Show resolved
Hide resolved
...main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageCounterRebuildManager.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageCursorProviderImpl.java
Show resolved
Hide resolved
...in/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionCounterImpl.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionImpl.java
Outdated
Show resolved
Hide resolved
8bd24b5
to
120d102
Compare
@gemmellr I will do some testing to make sure it's solid and I should merge it.. unless you have any other concerns. |
@clebertsuconic still need to look over the rest, plus whatever changed since yesterday. |
120d102
to
4282193
Compare
...mis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingManagerImpl.java
Show resolved
Hide resolved
...mis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingManagerImpl.java
Outdated
Show resolved
Hide resolved
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQMessageBundle.java
Outdated
Show resolved
Hide resolved
artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java
Outdated
Show resolved
Hide resolved
tests/compatibility-tests/src/main/resources/pageCounter/checkMessages.groovy
Show resolved
Hide resolved
tests/compatibility-tests/src/main/resources/pageCounter/sendMessages.groovy
Show resolved
Hide resolved
...test/java/org/apache/activemq/artemis/tests/integration/paging/PageCountSyncOnNonTXTest.java
Outdated
Show resolved
Hide resolved
7ce9e7f
to
eb075e2
Compare
- From now on we will save snapshots of page-counters on the journal (basically for compatibility with previous verions). And we will recount the records on startup. - While the rebuild is being done the value from the previous snapshot is still available with current updates.
eb075e2
to
7a64afb
Compare
I had a few successful run with this PR over the full CI now. |
aa84ea0
to
7a64afb
Compare
Instead of relying on the journal to store the value of the counters, and have it eventually getting out of sync we should just use real counters from reading the pages on startup.
In a test performed, reading 700 files didn't take more than 1 minute in a modest laptop. And besides the data will be available while the rebuild is being done.