[
https://issues.apache.org/jira/browse/CASSANDRA-16185?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yasar Arafath Baigh updated CASSANDRA-16185:
--------------------------------------------
Test and Documentation Plan:
CommitLogMetrics Test-CasesCommitLogMetrics Test-Cases
1. For below metrics, test-case are added in +*CommitLogTest.java*+ . In
test-cases, mutations are added, which internally update metrics.
* *completedTasks*
* *totalCommitLogSize*
* *waitingOnCommit*
2. *pendingTasks* - In +*AbstractCommitLogService.java*+ , added
testPendingTasks test-case, since pendingTasks metric are incremented and
decremented in single method of *AbstractCommitLogService::maybeWaitForSync* .
So introduced a dummy method incrementPendingTaks in
*FakeCommitLogService-class,* to manually update pendingTasks metric.
3. *waitingOnSegmentAllocation* - In +*CommitLogMetricsTest.java*+ test-case is
added. In test *commitlog_segment_size_in_mb* is changed to *1mb*, and adding
multiple mutations so that waitingOnSegmentAllocation metric updated while
creating new segments.
In normal case , waitingOnSegmentAllocation it will be zero, if during
test-execution, waitingOnSegmentAllocation was not updated, then manually
updating it.
was:
CommitLogMetrics Test-CasesCommitLogMetrics Test-Cases
1. For below metrics, test-case are added in +*CommitLogTest.java*+ . In
test-cases, mutations are added, which internally update metrics.
* *completedTasks*
* *totalCommitLogSize*
* *waitingOnCommit*
2. *pendingTasks* - In +*AbstractCommitLogService.java*+ , added
testPendingTasks test-case, since pendingTasks metric are incremented and
decremented in single method of *AbstractCommitLogService::maybeWaitForSync* .
So introduced a dummy method incrementPendingTaks in
*FakeCommitLogService-class,* to manually update pendingTasks metric.
3. *waitingOnSegmentAllocation* - In *CommitLogMetricsTest.java* test-case is
added. In test *commitlog_segment_size_in_mb* is changed to *1mb*, and adding
multiple mutations so that waitingOnSegmentAllocation metric updated while
creating new segments.
In normal case , waitingOnSegmentAllocation it will be zero, if during
test-execution, waitingOnSegmentAllocation was not updated, then manually
updating it.
> Add tests to cover CommitLog metrics
> ------------------------------------
>
> Key: CASSANDRA-16185
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16185
> Project: Cassandra
> Issue Type: Improvement
> Components: Test/unit
> Reporter: Benjamin Lerer
> Assignee: Yasar Arafath Baigh
> Priority: Normal
> Fix For: 4.0-beta
>
> Attachments: 0001-Unit-Test-cases-for-CommitLogMetrics.patch
>
>
> The only metrics that seems to be covered by unit test for the CommitLog
> metrics is {{oversizedMutations}}. We should add testing the other ones.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]