[
https://issues.apache.org/jira/browse/ARTEMIS-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16738737#comment-16738737
]
ASF GitHub Bot commented on ARTEMIS-2224:
-----------------------------------------
Github user franz1981 commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/2494#discussion_r246570552
--- Diff:
artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionImpl.java
---
@@ -864,21 +875,32 @@ private PageCursorInfo processACK(final PagePosition
pos) {
return info;
}
+ private void installTXCallback(final Transaction tx, final PagePosition
position) {
+ installTXCallback(tx, position, -1);
+ }
+
/**
* @param tx
* @param position
+ * @param persistentSize if negative it needs to be calculated on the
fly
*/
- private void installTXCallback(final Transaction tx, final PagePosition
position) {
+ private void installTXCallback(final Transaction tx, final PagePosition
position, final long persistentSize) {
if (position.getRecordID() >= 0) {
// It needs to persist, otherwise the cursor will return to the
fist page position
tx.setContainsPersistent();
}
PageCursorInfo info = getPageInfo(position);
PageCache cache = info.getCache();
- long size = 0;
if (cache != null) {
- size =
getPersistentSize(cache.getMessage(position.getMessageNr()));
+ final long size;
+ if (persistentSize < 0) {
--- End diff --
-1 is used as a reserved value in another point to trigger the cache lookup
> Reduce contention on LivePageCacheImpl
> --------------------------------------
>
> Key: ARTEMIS-2224
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2224
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Components: Broker
> Affects Versions: 2.7.0
> Reporter: Francesco Nigro
> Assignee: Francesco Nigro
> Priority: Major
>
> Has been measured that LIvePageCacheImpl operations are a source of
> contention on producer side while paging.
> This contention decrease the scalability of the broker in an evident way
> while using topics, because the page cache is been accessed concurrently by
> several producers to ack transactions while the messages are being appended.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)