clebertsuconic commented on code in PR #4101:
URL: https://github.com/apache/activemq-artemis/pull/4101#discussion_r896800704
##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java:
##########
@@ -626,6 +656,41 @@ public Page createPage(final int pageNumber) throws
Exception {
return page;
}
+ @Override
+ public final Page usePage(final long pageId) {
+ return usePage(pageId, true);
+ }
+
+ @Override
+ public Page usePage(final long pageId, final boolean create) {
+ synchronized (usedPages) {
+ try {
+ Page page = usedPages.get(pageId);
+ if (create && page == null) {
+ page = newPageObject(pageId);
+ if (page.getFile().exists()) {
+ page.getMessages();
+ injectPage(page);
+ }
Review Comment:
usedPages is a cache of pages being used by cursors or the current written
page. so, on that case the injectPage is to the page being written.
reusedPage on usedPage to me would sound the same.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]