[ https://issues.apache.org/jira/browse/OAK-7259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16380443#comment-16380443 ]
Andrei Dulceanu commented on OAK-7259: -------------------------------------- In the branch previously shared [0], I made the following changes: * extracted all the logic related to tracking writers in its own class, {{CommitsTracker}} * delegated logic for keeping last x writers to {{ConcurrentLinkedHashMap}} (introduced dependency to {{com.googlecode.concurrentlinkedhashmap}} in {{oak-parent}}; do we need to move this to {{oak-segment-tar}} only?) * unified {{SegmentNodeStoreStats.dequeuedAfter()}} and {{SegmentNodeStoreStats.onCommitDequeued()}} into a single method, as well as {{SegmentNodeStoreStats.onCommit}} and SegmentNodeStoreStats.committedAfter() {quote} I would prefer to return an empty table from SegmentNodeStoreStatsMBean.getCommitsCountPerWriter() and SegmentNodeStoreStatsMBean.getQueuedWriters() instead of throwing an OpenDataException. {quote} I couldn't find a reasonable solution for this, since having an empty {{data}} map in either of the methods will result in an {{IllegalArgumentException}} being raised. Any suggestions on how to avoid this? {quote} Just an idea for now, can (should?) we make SegmentNodeStoreStats.commitsCountMapMaxSize configurable through a setter in SegmentNodeStoreStatsMBean? {quote} The previous, custom logic for bookkeeping allowed changing the max size on the fly, but switching to {{ConcurrentLinkedHashMap}} we lost this flexibility. If this is truly needed, we could revisit the code (in a new issue?). [~frm], [~mduerig] WDYT? [0] https://github.com/dulceanu/jackrabbit-oak/tree/issues/OAK-7259 > Improve SegmentNodeStoreStats to include number of commits per thread and > threads currently waiting on the semaphore > -------------------------------------------------------------------------------------------------------------------- > > Key: OAK-7259 > URL: https://issues.apache.org/jira/browse/OAK-7259 > Project: Jackrabbit Oak > Issue Type: Improvement > Components: segment-tar > Reporter: Andrei Dulceanu > Assignee: Andrei Dulceanu > Priority: Major > Labels: tooling > Fix For: 1.9.0, 1.10 > > > When investigating the performance of {{segment-tar}}, the source of the > writes (commits) is a very useful indicator of the cause. > To better understand which threads are currently writing in the repository > and which are blocked on the semaphore, we need to improve > {{SegmentNodeStoreStats}} to: > * expose the number of commits executed per thread > * expose threads currently waiting on the semaphore -- This message was sent by Atlassian JIRA (v7.6.3#76005)