[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17551835#comment-17551835 ] ASF subversion and git services commented on GEODE-7846: Commit 28d31d89de607d8947fe17890b5a951dfc895299 in geode's branch refs/heads/feature/GEODE-7665 from zhouxh [ https://gitbox.apache.org/repos/asf?p=geode.git;h=28d31d89de ] GEODE-7683: introduce BR.cmnClearRegion Co-authored-by: Xiaojian Zhou GEODE-7684: Create messaging class for PR Clear (#4689) * Added new message class and test Co-authored-by: Benjamin Ross Co-authored-by: Donal Evans GEODE-7682: add PR.clear API (#4755) * GEODE-7683: introduce BR.cmnClearRegion Co-authored-by: Xiaojian Zhou PR.clear's event id should be created and used in BR (#4805) * GEODE-7857: PR.clear's event id should be created and used in BR GEODE-7912: cacheWriter should be triggered when PR.clear (#4882) Co-authored-by: Anil Co-authored-by: Xiaojian Zhou GEODE-7983: Clear region writer callbacks should not be invoked for bucket regions (#4954) GEODE-7676: Add PR clear with expiration tests (#4970) Added distributed tests to verify the clear operation on Partitioned Regions works as expected when expiration is configured. - Added unit and distributed tests. - Fixed LocalRegion class to clear the entryExpiryTasks Map whenever the cancelAllEntryExpiryTasks method is invoked. GEODE-7667: Add a 'clear' gfsh command for PR and RR clear (#4818) * Added clear command and modified remove functionality to clear PR Authored-by: Benjamin Ross GEODE-7676: Conversion of duration to seconds. GEODE-7894: Moving expiry tasks to AbstractRegion. GEODE-7667: Fixing test to include PR clear help text. GEODE-7678 (2nd PR) - Support for cache-listener and client-notification for Partitioned Region Clear operation (#5124) * GEODE-7678: Add support for cache listener and client notification for PR clear The changes are made to PR clear messaging and locking mechanism to preserve cache-listener and client-events ordering during concurrent cache operation while clear in progress. GEODE-7669 Test coverage for Partitioned Region clear with Overflow enabled (#5189) Authored-by: Jianxia Chen GEODE-8173: Add unit test (coverage) for PartitionedRegionClear class. (#5208) * GEODE-8173: Add unit test (coverage) for PartitionedRegionClear class. Co-authored-by: anilkumar gingade GEODE-8334: PR.clear should sync with putAll or removeAll on rvvLock (#5365) Co-authored-by: Xiaojian Zhou Co-authored-by: Anil Gingade GEODE-8361: Use Set instead of List to track cleared buckets (#5379) - Refactor PartitionRegionClear to use Set instead of List - Some other changes to remove warnings/alerts from PartitionedRegionClear and PartitionedRegionClearMessage Authored-by: Donal Evans GEODE-7670: PR Clear with Concurrent Ops DUnitTests (#4848) Added distributed tests to verify that the clear operation on Partitioned Regions works as expected when there are other concurrent operations happening on the cache (put, putAll, get, remove, removeAll, members added and members removed). GEODE-7680: PR.clear must be successful when interacting with rebalance (#5095) - Added DUnit tests to confirm that clear does not interfere with rebalance or vice versa - Test when member departs during clear/rebalance - Test when member joins during clear/rebalance - Fixed typo in PartitionedRegionClearWithExpirationDUnitTest - Fixed typo in PartitionedRegion - Call assignBucketsToPartitions() on leader colocated region during clear instead of target region Authored-by: Donal Evans GEODE-7846: Adding Stats for Partitioned Region Clear (#5391) Added stats to CachePerfStats for PR Clear - Changed clears to 'regionClears' and 'bucketClears' to differentiate between the number of times the region was cleared and the number of times a bucket was cleared in a PartitionedRegion - Added Local and Total duration stats to record how long clear has been running for a specific region, as well as how long it was spent clearing any specific member GEODE-7672: add dunit test to verify OQL index after PR clear. (#5436) * require rvv lock when create index fix rebase compiling error GEODE-7845 blocking PR region clear if one or more server versions are too old (#5577) - if a server is running an old version when a PR clear is invoked by the client, the client will receive a ServerOperationException with a cause of ServerVersionMismatchException. GEODE-7845: Adding a cleaner simpler test. (#5622) - Changed the test for ServerVersionMismatchException to be more readable. GEODE-7845: Now behaving with clients of various versions. (#5645) - added functionality that would allow the tests to be run using various versions of the clients against and and new versions of the server. GEODE-7858: PR.clear notify client should let the queue holder member to
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17320399#comment-17320399 ] ASF subversion and git services commented on GEODE-7846: Commit 248a56aefcf72e0c60e197b377adc6542662bdc2 in geode's branch refs/heads/feature/GEODE-7665 from zhouxh [ https://gitbox.apache.org/repos/asf?p=geode.git;h=248a56a ] GEODE-7683: introduce BR.cmnClearRegion Co-authored-by: Xiaojian Zhou GEODE-7684: Create messaging class for PR Clear (#4689) * Added new message class and test Co-authored-by: Benjamin Ross Co-authored-by: Donal Evans GEODE-7682: add PR.clear API (#4755) * GEODE-7683: introduce BR.cmnClearRegion Co-authored-by: Xiaojian Zhou PR.clear's event id should be created and used in BR (#4805) * GEODE-7857: PR.clear's event id should be created and used in BR GEODE-7912: cacheWriter should be triggered when PR.clear (#4882) Co-authored-by: Anil Co-authored-by: Xiaojian Zhou GEODE-7983: Clear region writer callbacks should not be invoked for bucket regions (#4954) GEODE-7676: Add PR clear with expiration tests (#4970) Added distributed tests to verify the clear operation on Partitioned Regions works as expected when expiration is configured. - Added unit and distributed tests. - Fixed LocalRegion class to clear the entryExpiryTasks Map whenever the cancelAllEntryExpiryTasks method is invoked. GEODE-7667: Add a 'clear' gfsh command for PR and RR clear (#4818) * Added clear command and modified remove functionality to clear PR Authored-by: Benjamin Ross GEODE-7676: Conversion of duration to seconds. GEODE-7894: Moving expiry tasks to AbstractRegion. GEODE-7667: Fixing test to include PR clear help text. GEODE-7678 (2nd PR) - Support for cache-listener and client-notification for Partitioned Region Clear operation (#5124) * GEODE-7678: Add support for cache listener and client notification for PR clear The changes are made to PR clear messaging and locking mechanism to preserve cache-listener and client-events ordering during concurrent cache operation while clear in progress. GEODE-7669 Test coverage for Partitioned Region clear with Overflow enabled (#5189) Authored-by: Jianxia Chen GEODE-8173: Add unit test (coverage) for PartitionedRegionClear class. (#5208) * GEODE-8173: Add unit test (coverage) for PartitionedRegionClear class. Co-authored-by: anilkumar gingade GEODE-8334: PR.clear should sync with putAll or removeAll on rvvLock (#5365) Co-authored-by: Xiaojian Zhou Co-authored-by: Anil Gingade GEODE-8361: Use Set instead of List to track cleared buckets (#5379) - Refactor PartitionRegionClear to use Set instead of List - Some other changes to remove warnings/alerts from PartitionedRegionClear and PartitionedRegionClearMessage Authored-by: Donal Evans GEODE-7670: PR Clear with Concurrent Ops DUnitTests (#4848) Added distributed tests to verify that the clear operation on Partitioned Regions works as expected when there are other concurrent operations happening on the cache (put, putAll, get, remove, removeAll, members added and members removed). GEODE-7680: PR.clear must be successful when interacting with rebalance (#5095) - Added DUnit tests to confirm that clear does not interfere with rebalance or vice versa - Test when member departs during clear/rebalance - Test when member joins during clear/rebalance - Fixed typo in PartitionedRegionClearWithExpirationDUnitTest - Fixed typo in PartitionedRegion - Call assignBucketsToPartitions() on leader colocated region during clear instead of target region Authored-by: Donal Evans GEODE-7846: Adding Stats for Partitioned Region Clear (#5391) Added stats to CachePerfStats for PR Clear - Changed clears to 'regionClears' and 'bucketClears' to differentiate between the number of times the region was cleared and the number of times a bucket was cleared in a PartitionedRegion - Added Local and Total duration stats to record how long clear has been running for a specific region, as well as how long it was spent clearing any specific member GEODE-7672: add dunit test to verify OQL index after PR clear. (#5436) * require rvv lock when create index fix rebase compiling error GEODE-7845 blocking PR region clear if one or more server versions are too old (#5577) - if a server is running an old version when a PR clear is invoked by the client, the client will receive a ServerOperationException with a cause of ServerVersionMismatchException. GEODE-7845: Adding a cleaner simpler test. (#5622) - Changed the test for ServerVersionMismatchException to be more readable. GEODE-7845: Now behaving with clients of various versions. (#5645) - added functionality that would allow the tests to be run using various versions of the clients against and and new versions of the server. GEODE-7858: PR.clear notify client should let the queue holder member to
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17241794#comment-17241794 ] ASF subversion and git services commented on GEODE-7846: Commit 6f5bbb32ebfb3b93b6e50dbe640f55a74910340b in geode's branch refs/heads/feature/GEODE-7665 from BenjaminPerryRoss [ https://gitbox.apache.org/repos/asf?p=geode.git;h=6f5bbb3 ] GEODE-7846: Adding Stats for Partitioned Region Clear (#5391) Added stats to CachePerfStats for PR Clear - Changed clears to 'regionClears' and 'bucketClears' to differentiate between the number of times the region was cleared and the number of times a bucket was cleared in a PartitionedRegion - Added Local and Total duration stats to record how long clear has been running for a specific region, as well as how long it was spent clearing any specific member > Clear in Partitioned Region should have its own stats > - > > Key: GEODE-7846 > URL: https://issues.apache.org/jira/browse/GEODE-7846 > Project: Geode > Issue Type: Improvement > Components: core >Reporter: Xiaojian Zhou >Assignee: Benjamin P Ross >Priority: Major > Labels: GeodeCommons, GeodeOperationAPI, pull-request-available > > Clear operation in PR should have its own stats: > 1) clear operation executed. > 2) clear operation failed > 3) clear messages sends to buckets -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17222376#comment-17222376 ] ASF subversion and git services commented on GEODE-7846: Commit 5e1162fc89dc5cfce8448f0aba3f37fbd84466b5 in geode's branch refs/heads/feature/GEODE-7665 from BenjaminPerryRoss [ https://gitbox.apache.org/repos/asf?p=geode.git;h=5e1162f ] GEODE-7846: Adding Stats for Partitioned Region Clear (#5391) Added stats to CachePerfStats for PR Clear - Changed clears to 'regionClears' and 'bucketClears' to differentiate between the number of times the region was cleared and the number of times a bucket was cleared in a PartitionedRegion - Added Local and Total duration stats to record how long clear has been running for a specific region, as well as how long it was spent clearing any specific member > Clear in Partitioned Region should have its own stats > - > > Key: GEODE-7846 > URL: https://issues.apache.org/jira/browse/GEODE-7846 > Project: Geode > Issue Type: Improvement > Components: core >Reporter: Xiaojian Zhou >Assignee: Benjamin P Ross >Priority: Major > Labels: GeodeCommons, GeodeOperationAPI, pull-request-available > > Clear operation in PR should have its own stats: > 1) clear operation executed. > 2) clear operation failed > 3) clear messages sends to buckets -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17222367#comment-17222367 ] ASF subversion and git services commented on GEODE-7846: Commit 5e1162fc89dc5cfce8448f0aba3f37fbd84466b5 in geode's branch refs/heads/feature/GEODE-7665 from BenjaminPerryRoss [ https://gitbox.apache.org/repos/asf?p=geode.git;h=5e1162f ] GEODE-7846: Adding Stats for Partitioned Region Clear (#5391) Added stats to CachePerfStats for PR Clear - Changed clears to 'regionClears' and 'bucketClears' to differentiate between the number of times the region was cleared and the number of times a bucket was cleared in a PartitionedRegion - Added Local and Total duration stats to record how long clear has been running for a specific region, as well as how long it was spent clearing any specific member > Clear in Partitioned Region should have its own stats > - > > Key: GEODE-7846 > URL: https://issues.apache.org/jira/browse/GEODE-7846 > Project: Geode > Issue Type: Improvement > Components: core >Reporter: Xiaojian Zhou >Assignee: Benjamin P Ross >Priority: Major > Labels: GeodeCommons, GeodeOperationAPI, pull-request-available > > Clear operation in PR should have its own stats: > 1) clear operation executed. > 2) clear operation failed > 3) clear messages sends to buckets -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17214181#comment-17214181 ] ASF subversion and git services commented on GEODE-7846: Commit 91b19ccbc345d49483151e889b6e354634e187a7 in geode's branch refs/heads/feature/GEODE-7665 from BenjaminPerryRoss [ https://gitbox.apache.org/repos/asf?p=geode.git;h=91b19cc ] GEODE-7846: Adding Stats for Partitioned Region Clear (#5391) Added stats to CachePerfStats for PR Clear - Changed clears to 'regionClears' and 'bucketClears' to differentiate between the number of times the region was cleared and the number of times a bucket was cleared in a PartitionedRegion - Added Local and Total duration stats to record how long clear has been running for a specific region, as well as how long it was spent clearing any specific member > Clear in Partitioned Region should have its own stats > - > > Key: GEODE-7846 > URL: https://issues.apache.org/jira/browse/GEODE-7846 > Project: Geode > Issue Type: Improvement > Components: core >Reporter: Xiaojian Zhou >Assignee: Benjamin P Ross >Priority: Major > Labels: GeodeCommons, GeodeOperationAPI, pull-request-available > > Clear operation in PR should have its own stats: > 1) clear operation executed. > 2) clear operation failed > 3) clear messages sends to buckets -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17214171#comment-17214171 ] ASF subversion and git services commented on GEODE-7846: Commit 91b19ccbc345d49483151e889b6e354634e187a7 in geode's branch refs/heads/feature/GEODE-7665 from BenjaminPerryRoss [ https://gitbox.apache.org/repos/asf?p=geode.git;h=91b19cc ] GEODE-7846: Adding Stats for Partitioned Region Clear (#5391) Added stats to CachePerfStats for PR Clear - Changed clears to 'regionClears' and 'bucketClears' to differentiate between the number of times the region was cleared and the number of times a bucket was cleared in a PartitionedRegion - Added Local and Total duration stats to record how long clear has been running for a specific region, as well as how long it was spent clearing any specific member > Clear in Partitioned Region should have its own stats > - > > Key: GEODE-7846 > URL: https://issues.apache.org/jira/browse/GEODE-7846 > Project: Geode > Issue Type: Improvement > Components: core >Reporter: Xiaojian Zhou >Assignee: Benjamin P Ross >Priority: Major > Labels: GeodeCommons, GeodeOperationAPI, pull-request-available > > Clear operation in PR should have its own stats: > 1) clear operation executed. > 2) clear operation failed > 3) clear messages sends to buckets -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17214159#comment-17214159 ] ASF subversion and git services commented on GEODE-7846: Commit 91b19ccbc345d49483151e889b6e354634e187a7 in geode's branch refs/heads/feature/GEODE-7665 from BenjaminPerryRoss [ https://gitbox.apache.org/repos/asf?p=geode.git;h=91b19cc ] GEODE-7846: Adding Stats for Partitioned Region Clear (#5391) Added stats to CachePerfStats for PR Clear - Changed clears to 'regionClears' and 'bucketClears' to differentiate between the number of times the region was cleared and the number of times a bucket was cleared in a PartitionedRegion - Added Local and Total duration stats to record how long clear has been running for a specific region, as well as how long it was spent clearing any specific member > Clear in Partitioned Region should have its own stats > - > > Key: GEODE-7846 > URL: https://issues.apache.org/jira/browse/GEODE-7846 > Project: Geode > Issue Type: Improvement > Components: core >Reporter: Xiaojian Zhou >Assignee: Benjamin P Ross >Priority: Major > Labels: GeodeCommons, GeodeOperationAPI, pull-request-available > > Clear operation in PR should have its own stats: > 1) clear operation executed. > 2) clear operation failed > 3) clear messages sends to buckets -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17214149#comment-17214149 ] ASF subversion and git services commented on GEODE-7846: Commit 91b19ccbc345d49483151e889b6e354634e187a7 in geode's branch refs/heads/feature/GEODE-7665 from BenjaminPerryRoss [ https://gitbox.apache.org/repos/asf?p=geode.git;h=91b19cc ] GEODE-7846: Adding Stats for Partitioned Region Clear (#5391) Added stats to CachePerfStats for PR Clear - Changed clears to 'regionClears' and 'bucketClears' to differentiate between the number of times the region was cleared and the number of times a bucket was cleared in a PartitionedRegion - Added Local and Total duration stats to record how long clear has been running for a specific region, as well as how long it was spent clearing any specific member > Clear in Partitioned Region should have its own stats > - > > Key: GEODE-7846 > URL: https://issues.apache.org/jira/browse/GEODE-7846 > Project: Geode > Issue Type: Improvement > Components: core >Reporter: Xiaojian Zhou >Assignee: Benjamin P Ross >Priority: Major > Labels: GeodeCommons, GeodeOperationAPI, pull-request-available > > Clear operation in PR should have its own stats: > 1) clear operation executed. > 2) clear operation failed > 3) clear messages sends to buckets -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17214138#comment-17214138 ] ASF subversion and git services commented on GEODE-7846: Commit 91b19ccbc345d49483151e889b6e354634e187a7 in geode's branch refs/heads/feature/GEODE-7665 from BenjaminPerryRoss [ https://gitbox.apache.org/repos/asf?p=geode.git;h=91b19cc ] GEODE-7846: Adding Stats for Partitioned Region Clear (#5391) Added stats to CachePerfStats for PR Clear - Changed clears to 'regionClears' and 'bucketClears' to differentiate between the number of times the region was cleared and the number of times a bucket was cleared in a PartitionedRegion - Added Local and Total duration stats to record how long clear has been running for a specific region, as well as how long it was spent clearing any specific member > Clear in Partitioned Region should have its own stats > - > > Key: GEODE-7846 > URL: https://issues.apache.org/jira/browse/GEODE-7846 > Project: Geode > Issue Type: Improvement > Components: core >Reporter: Xiaojian Zhou >Assignee: Benjamin P Ross >Priority: Major > Labels: GeodeCommons, GeodeOperationAPI, pull-request-available > > Clear operation in PR should have its own stats: > 1) clear operation executed. > 2) clear operation failed > 3) clear messages sends to buckets -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17206480#comment-17206480 ] ASF subversion and git services commented on GEODE-7846: Commit b21b29b23f9308970203b8b5517e268e86fbdb36 in geode's branch refs/heads/feature/GEODE-7665 from BenjaminPerryRoss [ https://gitbox.apache.org/repos/asf?p=geode.git;h=b21b29b ] GEODE-7846: Adding Stats for Partitioned Region Clear (#5391) Added stats to CachePerfStats for PR Clear - Changed clears to 'regionClears' and 'bucketClears' to differentiate between the number of times the region was cleared and the number of times a bucket was cleared in a PartitionedRegion - Added Local and Total duration stats to record how long clear has been running for a specific region, as well as how long it was spent clearing any specific member > Clear in Partitioned Region should have its own stats > - > > Key: GEODE-7846 > URL: https://issues.apache.org/jira/browse/GEODE-7846 > Project: Geode > Issue Type: Improvement > Components: core >Reporter: Xiaojian Zhou >Assignee: Benjamin P Ross >Priority: Major > Labels: GeodeCommons, GeodeOperationAPI, pull-request-available > > Clear operation in PR should have its own stats: > 1) clear operation executed. > 2) clear operation failed > 3) clear messages sends to buckets -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17206467#comment-17206467 ] ASF subversion and git services commented on GEODE-7846: Commit b21b29b23f9308970203b8b5517e268e86fbdb36 in geode's branch refs/heads/feature/GEODE-7665 from BenjaminPerryRoss [ https://gitbox.apache.org/repos/asf?p=geode.git;h=b21b29b ] GEODE-7846: Adding Stats for Partitioned Region Clear (#5391) Added stats to CachePerfStats for PR Clear - Changed clears to 'regionClears' and 'bucketClears' to differentiate between the number of times the region was cleared and the number of times a bucket was cleared in a PartitionedRegion - Added Local and Total duration stats to record how long clear has been running for a specific region, as well as how long it was spent clearing any specific member > Clear in Partitioned Region should have its own stats > - > > Key: GEODE-7846 > URL: https://issues.apache.org/jira/browse/GEODE-7846 > Project: Geode > Issue Type: Improvement > Components: core >Reporter: Xiaojian Zhou >Assignee: Benjamin P Ross >Priority: Major > Labels: GeodeCommons, GeodeOperationAPI, pull-request-available > > Clear operation in PR should have its own stats: > 1) clear operation executed. > 2) clear operation failed > 3) clear messages sends to buckets -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17206454#comment-17206454 ] ASF subversion and git services commented on GEODE-7846: Commit b21b29b23f9308970203b8b5517e268e86fbdb36 in geode's branch refs/heads/feature/GEODE-7665 from BenjaminPerryRoss [ https://gitbox.apache.org/repos/asf?p=geode.git;h=b21b29b ] GEODE-7846: Adding Stats for Partitioned Region Clear (#5391) Added stats to CachePerfStats for PR Clear - Changed clears to 'regionClears' and 'bucketClears' to differentiate between the number of times the region was cleared and the number of times a bucket was cleared in a PartitionedRegion - Added Local and Total duration stats to record how long clear has been running for a specific region, as well as how long it was spent clearing any specific member > Clear in Partitioned Region should have its own stats > - > > Key: GEODE-7846 > URL: https://issues.apache.org/jira/browse/GEODE-7846 > Project: Geode > Issue Type: Improvement > Components: core >Reporter: Xiaojian Zhou >Assignee: Benjamin P Ross >Priority: Major > Labels: GeodeCommons, GeodeOperationAPI, pull-request-available > > Clear operation in PR should have its own stats: > 1) clear operation executed. > 2) clear operation failed > 3) clear messages sends to buckets -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17206442#comment-17206442 ] ASF subversion and git services commented on GEODE-7846: Commit b21b29b23f9308970203b8b5517e268e86fbdb36 in geode's branch refs/heads/feature/GEODE-7665 from BenjaminPerryRoss [ https://gitbox.apache.org/repos/asf?p=geode.git;h=b21b29b ] GEODE-7846: Adding Stats for Partitioned Region Clear (#5391) Added stats to CachePerfStats for PR Clear - Changed clears to 'regionClears' and 'bucketClears' to differentiate between the number of times the region was cleared and the number of times a bucket was cleared in a PartitionedRegion - Added Local and Total duration stats to record how long clear has been running for a specific region, as well as how long it was spent clearing any specific member > Clear in Partitioned Region should have its own stats > - > > Key: GEODE-7846 > URL: https://issues.apache.org/jira/browse/GEODE-7846 > Project: Geode > Issue Type: Improvement > Components: core >Reporter: Xiaojian Zhou >Assignee: Benjamin P Ross >Priority: Major > Labels: GeodeCommons, GeodeOperationAPI, pull-request-available > > Clear operation in PR should have its own stats: > 1) clear operation executed. > 2) clear operation failed > 3) clear messages sends to buckets -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17206429#comment-17206429 ] ASF subversion and git services commented on GEODE-7846: Commit b21b29b23f9308970203b8b5517e268e86fbdb36 in geode's branch refs/heads/feature/GEODE-7665 from BenjaminPerryRoss [ https://gitbox.apache.org/repos/asf?p=geode.git;h=b21b29b ] GEODE-7846: Adding Stats for Partitioned Region Clear (#5391) Added stats to CachePerfStats for PR Clear - Changed clears to 'regionClears' and 'bucketClears' to differentiate between the number of times the region was cleared and the number of times a bucket was cleared in a PartitionedRegion - Added Local and Total duration stats to record how long clear has been running for a specific region, as well as how long it was spent clearing any specific member > Clear in Partitioned Region should have its own stats > - > > Key: GEODE-7846 > URL: https://issues.apache.org/jira/browse/GEODE-7846 > Project: Geode > Issue Type: Improvement > Components: core >Reporter: Xiaojian Zhou >Assignee: Benjamin P Ross >Priority: Major > Labels: GeodeCommons, GeodeOperationAPI, pull-request-available > > Clear operation in PR should have its own stats: > 1) clear operation executed. > 2) clear operation failed > 3) clear messages sends to buckets -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17180833#comment-17180833 ] ASF GitHub Bot commented on GEODE-7846: --- BenjaminPerryRoss merged pull request #5391: URL: https://github.com/apache/geode/pull/5391 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Clear in Partitioned Region should have its own stats > - > > Key: GEODE-7846 > URL: https://issues.apache.org/jira/browse/GEODE-7846 > Project: Geode > Issue Type: Improvement > Components: core >Reporter: Xiaojian Zhou >Assignee: Benjamin P Ross >Priority: Major > Labels: GeodeCommons, GeodeOperationAPI, pull-request-available > > Clear operation in PR should have its own stats: > 1) clear operation executed. > 2) clear operation failed > 3) clear messages sends to buckets -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17180834#comment-17180834 ] ASF subversion and git services commented on GEODE-7846: Commit 6e7b949d83407aca094546b96a3d74dc9f9343c4 in geode's branch refs/heads/feature/GEODE-7665 from BenjaminPerryRoss [ https://gitbox.apache.org/repos/asf?p=geode.git;h=6e7b949 ] GEODE-7846: Adding Stats for Partitioned Region Clear (#5391) Added stats to CachePerfStats for PR Clear - Changed clears to 'regionClears' and 'bucketClears' to differentiate between the number of times the region was cleared and the number of times a bucket was cleared in a PartitionedRegion - Added Local and Total duration stats to record how long clear has been running for a specific region, as well as how long it was spent clearing any specific member > Clear in Partitioned Region should have its own stats > - > > Key: GEODE-7846 > URL: https://issues.apache.org/jira/browse/GEODE-7846 > Project: Geode > Issue Type: Improvement > Components: core >Reporter: Xiaojian Zhou >Assignee: Benjamin P Ross >Priority: Major > Labels: GeodeCommons, GeodeOperationAPI, pull-request-available > > Clear operation in PR should have its own stats: > 1) clear operation executed. > 2) clear operation failed > 3) clear messages sends to buckets -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17176662#comment-17176662 ] ASF GitHub Bot commented on GEODE-7846: --- DonalEvans commented on a change in pull request #5391: URL: https://github.com/apache/geode/pull/5391#discussion_r469611803 ## File path: geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java ## @@ -378,8 +378,11 @@ void doClear(RegionEventImpl regionEvent, boolean cacheWrite) { } finally { releaseDistributedClearLock(lockName); if (partitionedRegion.getCachePerfStats() != null) { Review comment: I think that the null check on `partitionedRegion.getCachePerfStats()` is no longer necessary with this change, since it's not them we're updating. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Clear in Partitioned Region should have its own stats > - > > Key: GEODE-7846 > URL: https://issues.apache.org/jira/browse/GEODE-7846 > Project: Geode > Issue Type: Improvement > Components: core >Reporter: Xiaojian Zhou >Assignee: Benjamin P Ross >Priority: Major > Labels: GeodeCommons, GeodeOperationAPI, pull-request-available > > Clear operation in PR should have its own stats: > 1) clear operation executed. > 2) clear operation failed > 3) clear messages sends to buckets -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17170374#comment-17170374 ] ASF GitHub Bot commented on GEODE-7846: --- BenjaminPerryRoss commented on a change in pull request #5391: URL: https://github.com/apache/geode/pull/5391#discussion_r464609432 ## File path: geode-core/src/main/java/org/apache/geode/internal/cache/CachePerfStats.java ## @@ -274,7 +278,14 @@ "Current number of regions configured for reliablity that are missing required roles with Limited access"; final String reliableRegionsMissingNoAccessDesc = "Current number of regions configured for reliablity that are missing required roles with No access"; -final String clearsDesc = "The total number of times a clear has been done on this cache."; +final String regionClearsDesc = +"The total number of times a clear has been done on this cache."; +final String bucketClearsDesc = +"The total number of times a clear has been done on this region and it's bucket regions"; +final String partitionedRegionClearLocalDurationDesc = +"The time in nanoseconds partitioned region clear has been running for the region on this member"; Review comment: I actually switched this from the original metric I used to nanoseconds because other stats in the file seem to be using them and I wanted to be consistent (such as EventQueueThrottleTime or any of the tx lifetime stats in that class). 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Clear in Partitioned Region should have its own stats > - > > Key: GEODE-7846 > URL: https://issues.apache.org/jira/browse/GEODE-7846 > Project: Geode > Issue Type: Improvement > Components: core >Reporter: Xiaojian Zhou >Priority: Major > Labels: GeodeCommons, GeodeOperationAPI, pull-request-available > > Clear operation in PR should have its own stats: > 1) clear operation executed. > 2) clear operation failed > 3) clear messages sends to buckets -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17170366#comment-17170366 ] ASF GitHub Bot commented on GEODE-7846: --- BenjaminPerryRoss commented on a change in pull request #5391: URL: https://github.com/apache/geode/pull/5391#discussion_r464609432 ## File path: geode-core/src/main/java/org/apache/geode/internal/cache/CachePerfStats.java ## @@ -274,7 +278,14 @@ "Current number of regions configured for reliablity that are missing required roles with Limited access"; final String reliableRegionsMissingNoAccessDesc = "Current number of regions configured for reliablity that are missing required roles with No access"; -final String clearsDesc = "The total number of times a clear has been done on this cache."; +final String regionClearsDesc = +"The total number of times a clear has been done on this cache."; +final String bucketClearsDesc = +"The total number of times a clear has been done on this region and it's bucket regions"; +final String partitionedRegionClearLocalDurationDesc = +"The time in nanoseconds partitioned region clear has been running for the region on this member"; Review comment: I actually switch this from the original metric I used to nanoseconds because other stats in the file seem to be using them and I wanted to be consistent (such as EventQueueThrottleTime or any of the tx lifetime stats in that class). 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Clear in Partitioned Region should have its own stats > - > > Key: GEODE-7846 > URL: https://issues.apache.org/jira/browse/GEODE-7846 > Project: Geode > Issue Type: Improvement > Components: core >Reporter: Xiaojian Zhou >Priority: Major > Labels: GeodeCommons, GeodeOperationAPI, pull-request-available > > Clear operation in PR should have its own stats: > 1) clear operation executed. > 2) clear operation failed > 3) clear messages sends to buckets -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17170334#comment-17170334 ] ASF GitHub Bot commented on GEODE-7846: --- gesterzhou commented on a change in pull request #5391: URL: https://github.com/apache/geode/pull/5391#discussion_r464583502 ## File path: geode-core/src/main/java/org/apache/geode/internal/cache/CachePerfStats.java ## @@ -274,7 +278,14 @@ "Current number of regions configured for reliablity that are missing required roles with Limited access"; final String reliableRegionsMissingNoAccessDesc = "Current number of regions configured for reliablity that are missing required roles with No access"; -final String clearsDesc = "The total number of times a clear has been done on this cache."; +final String regionClearsDesc = +"The total number of times a clear has been done on this cache."; +final String bucketClearsDesc = +"The total number of times a clear has been done on this region and it's bucket regions"; +final String partitionedRegionClearLocalDurationDesc = +"The time in nanoseconds partitioned region clear has been running for the region on this member"; Review comment: we have to follow other duration stats's timeunit. If other duration stats used nanoseconds, we use it too. Otherwise, we should not. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Clear in Partitioned Region should have its own stats > - > > Key: GEODE-7846 > URL: https://issues.apache.org/jira/browse/GEODE-7846 > Project: Geode > Issue Type: Improvement > Components: core >Reporter: Xiaojian Zhou >Priority: Major > Labels: GeodeCommons, GeodeOperationAPI, pull-request-available > > Clear operation in PR should have its own stats: > 1) clear operation executed. > 2) clear operation failed > 3) clear messages sends to buckets -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17170328#comment-17170328 ] ASF GitHub Bot commented on GEODE-7846: --- gesterzhou commented on a change in pull request #5391: URL: https://github.com/apache/geode/pull/5391#discussion_r464581367 ## File path: geode-core/src/main/java/org/apache/geode/internal/cache/CachePerfStats.java ## @@ -274,7 +278,14 @@ "Current number of regions configured for reliablity that are missing required roles with Limited access"; final String reliableRegionsMissingNoAccessDesc = "Current number of regions configured for reliablity that are missing required roles with No access"; -final String clearsDesc = "The total number of times a clear has been done on this cache."; +final String regionClearsDesc = +"The total number of times a clear has been done on this cache."; Review comment: on this cache? or on this region? 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Clear in Partitioned Region should have its own stats > - > > Key: GEODE-7846 > URL: https://issues.apache.org/jira/browse/GEODE-7846 > Project: Geode > Issue Type: Improvement > Components: core >Reporter: Xiaojian Zhou >Priority: Major > Labels: GeodeCommons, GeodeOperationAPI, pull-request-available > > Clear operation in PR should have its own stats: > 1) clear operation executed. > 2) clear operation failed > 3) clear messages sends to buckets -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17170215#comment-17170215 ] ASF GitHub Bot commented on GEODE-7846: --- gesterzhou commented on a change in pull request #5391: URL: https://github.com/apache/geode/pull/5391#discussion_r464551192 ## File path: geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionMap.java ## @@ -344,7 +344,12 @@ void incClearCount(LocalRegion lr) { if (lr != null && !(lr instanceof HARegion)) { CachePerfStats stats = lr.getCachePerfStats(); if (stats != null) { -stats.incClearCount(); +if (lr instanceof BucketRegion) { Review comment: Usually we use: if (owner.isUsedForPartitionedRegionBucket()) { instead. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Clear in Partitioned Region should have its own stats > - > > Key: GEODE-7846 > URL: https://issues.apache.org/jira/browse/GEODE-7846 > Project: Geode > Issue Type: Improvement > Components: core >Reporter: Xiaojian Zhou >Priority: Major > Labels: GeodeCommons, GeodeOperationAPI, pull-request-available > > Clear operation in PR should have its own stats: > 1) clear operation executed. > 2) clear operation failed > 3) clear messages sends to buckets -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17167713#comment-17167713 ] ASF GitHub Bot commented on GEODE-7846: --- lgtm-com[bot] commented on pull request #5391: URL: https://github.com/apache/geode/pull/5391#issuecomment-665988909 This pull request **introduces 1 alert** when merging e244dd930a2dabc3eb0e56dc81ca0ad89d4243f8 into b941d7fe7fb0df69636fbb7847899d10cf281dea - [view on LGTM.com](https://lgtm.com/projects/g/apache/geode/rev/pr-64b59f7d0338e3fa594db61fe891701b2f58940f) **new alerts:** * 1 for Boxed variable is never null 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Clear in Partitioned Region should have its own stats > - > > Key: GEODE-7846 > URL: https://issues.apache.org/jira/browse/GEODE-7846 > Project: Geode > Issue Type: Improvement > Components: core >Reporter: Xiaojian Zhou >Priority: Major > Labels: GeodeCommons, GeodeOperationAPI, pull-request-available > > Clear operation in PR should have its own stats: > 1) clear operation executed. > 2) clear operation failed > 3) clear messages sends to buckets -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17167708#comment-17167708 ] ASF GitHub Bot commented on GEODE-7846: --- BenjaminPerryRoss commented on a change in pull request #5391: URL: https://github.com/apache/geode/pull/5391#discussion_r462642093 ## File path: geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearDUnitTest.java ## @@ -330,6 +337,101 @@ public void normalClearFromAccessorWithoutWriterButWithWriterOnDataStore() { .isEqualTo(0); } + @Test + public void normalClearFromDataStoreUpdatesStats() { +configureServers(false, true); +client1.invoke(this::initClientCache); +client2.invoke(this::initClientCache); + +// Verify no clears have been recorded in stats +dataStore1.invoke(() -> { + PartitionedRegion region = (PartitionedRegion) getRegion(false); + + for (BucketRegion bucket : region.getDataStore().getAllLocalBucketRegions()) { +long clearCount = bucket.getCachePerfStats().getRegionClearCount(); +assertThat(clearCount).isEqualTo(0); + } +}); + +accessor.invoke(() -> feed(false)); +verifyServerRegionSize(NUM_ENTRIES); +dataStore1.invoke(() -> getRegion(false).clear()); +verifyServerRegionSize(0); + +// Verify the stats were properly updated for the bucket regions +dataStore1.invoke(() -> { + PartitionedRegion region = (PartitionedRegion) getRegion(false); + long clearCount = 0L; Review comment: Done. ## File path: geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearDUnitTest.java ## @@ -330,6 +337,101 @@ public void normalClearFromAccessorWithoutWriterButWithWriterOnDataStore() { .isEqualTo(0); } + @Test + public void normalClearFromDataStoreUpdatesStats() { +configureServers(false, true); +client1.invoke(this::initClientCache); +client2.invoke(this::initClientCache); + +// Verify no clears have been recorded in stats +dataStore1.invoke(() -> { + PartitionedRegion region = (PartitionedRegion) getRegion(false); + + for (BucketRegion bucket : region.getDataStore().getAllLocalBucketRegions()) { +long clearCount = bucket.getCachePerfStats().getRegionClearCount(); +assertThat(clearCount).isEqualTo(0); + } +}); + +accessor.invoke(() -> feed(false)); +verifyServerRegionSize(NUM_ENTRIES); +dataStore1.invoke(() -> getRegion(false).clear()); +verifyServerRegionSize(0); + +// Verify the stats were properly updated for the bucket regions +dataStore1.invoke(() -> { + PartitionedRegion region = (PartitionedRegion) getRegion(false); + long clearCount = 0L; + + for (BucketRegion bucket : region.getDataStore().getAllLocalBucketRegions()) { +if (clearCount == 0) { + clearCount = bucket.getCachePerfStats().getBucketClearCount(); +} + assertThat(bucket.getCachePerfStats().getBucketClearCount()).isEqualTo(clearCount) +.isNotEqualTo(0); + } + + assertThat(region.getCachePerfStats().getRegionClearCount()).isEqualTo(1); + assertThat(region.getCachePerfStats().getPartitionedRegionClearDuration()).isGreaterThan(0); +}); + +dataStore2.invoke(() -> { + PartitionedRegion region = (PartitionedRegion) getRegion(false); + long clearCount = 0L; + + for (BucketRegion bucket : region.getDataStore().getAllLocalBucketRegions()) { +if (clearCount == 0) { + clearCount = bucket.getCachePerfStats().getBucketClearCount(); +} + assertThat(bucket.getCachePerfStats().getBucketClearCount()).isEqualTo(clearCount) +.isNotEqualTo(0); + } + + assertThat(region.getCachePerfStats().getRegionClearCount()).isEqualTo(1); +}); + +dataStore3.invoke(() -> { + PartitionedRegion region = (PartitionedRegion) getRegion(false); + long clearCount = 0L; + + for (BucketRegion bucket : region.getDataStore().getAllLocalBucketRegions()) { +if (clearCount == 0) { + clearCount = bucket.getCachePerfStats().getBucketClearCount(); +} + assertThat(bucket.getCachePerfStats().getBucketClearCount()).isEqualTo(clearCount) +.isNotEqualTo(0); + } + + assertThat(region.getCachePerfStats().getRegionClearCount()).isEqualTo(1); +}); + + +// The accessor shouldn't increment the region clear count +accessor.invoke(() -> { + PartitionedRegion region = (PartitionedRegion) getRegion(false); + assertThat(region.getCachePerfStats().getRegionClearCount()).isEqualTo(0); +}); + +// do the region destroy to compare that the same callbacks will be triggered +dataStore1.invoke(() -> { + Region region = getRegion(false); + region.destroyRegion(); +}); + +
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17167709#comment-17167709 ] ASF GitHub Bot commented on GEODE-7846: --- DonalEvans commented on a change in pull request #5391: URL: https://github.com/apache/geode/pull/5391#discussion_r462643746 ## File path: geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java ## @@ -123,6 +123,7 @@ protected void waitForPrimary(PartitionedRegion.RetryTimeKeeper retryTimer) { public Set clearRegionLocal(RegionEventImpl regionEvent) { Set clearedBuckets = new HashSet<>(); +Long clearStartTime = System.nanoTime(); Review comment: Changing this from `Long` to `long` will fix the LGTM alert introduced by this PR. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Clear in Partitioned Region should have its own stats > - > > Key: GEODE-7846 > URL: https://issues.apache.org/jira/browse/GEODE-7846 > Project: Geode > Issue Type: Improvement > Components: core >Reporter: Xiaojian Zhou >Priority: Major > Labels: GeodeCommons, GeodeOperationAPI, pull-request-available > > Clear operation in PR should have its own stats: > 1) clear operation executed. > 2) clear operation failed > 3) clear messages sends to buckets -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17167034#comment-17167034 ] ASF GitHub Bot commented on GEODE-7846: --- DonalEvans commented on a change in pull request #5391: URL: https://github.com/apache/geode/pull/5391#discussion_r461227033 ## File path: geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearDUnitTest.java ## @@ -330,6 +337,101 @@ public void normalClearFromAccessorWithoutWriterButWithWriterOnDataStore() { .isEqualTo(0); } + @Test + public void normalClearFromDataStoreUpdatesStats() { +configureServers(false, true); +client1.invoke(this::initClientCache); +client2.invoke(this::initClientCache); + +// Verify no clears have been recorded in stats +dataStore1.invoke(() -> { + PartitionedRegion region = (PartitionedRegion) getRegion(false); + + for (BucketRegion bucket : region.getDataStore().getAllLocalBucketRegions()) { +long clearCount = bucket.getCachePerfStats().getRegionClearCount(); +assertThat(clearCount).isEqualTo(0); + } +}); + +accessor.invoke(() -> feed(false)); +verifyServerRegionSize(NUM_ENTRIES); +dataStore1.invoke(() -> getRegion(false).clear()); +verifyServerRegionSize(0); + +// Verify the stats were properly updated for the bucket regions +dataStore1.invoke(() -> { + PartitionedRegion region = (PartitionedRegion) getRegion(false); + long clearCount = 0L; Review comment: If it's safe to assume that buckets aren't moving around during the clear (which in this test seems to be the case) then it should be possible to get the number of buckets on each member with `region.getDataStore().getAllLocalBucketRegions()` and use that for verification. ## File path: geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java ## @@ -367,12 +370,38 @@ void doClear(RegionEventImpl regionEvent, boolean cacheWrite) { releaseLockForClear(regionEvent); } } - } finally { releaseDistributedClearLock(lockName); + incClearDuration(System.nanoTime() - clearStartTime); +} + } + + void incClearCount() { +if (partitionedRegion != null && partitionedRegion.getDataStore() != null +&& partitionedRegion.getDataStore().getAllLocalBucketRegions() != null +&& partitionedRegion.getDataStore().getAllLocalBucketRegions().size() != 0) { Review comment: Might it be possible to instead move the call to this method (and `incClearDuration()`, if it ends up staying where it currently is) inside the `if (partitionedRegion.getDataStore() != null)` block in `clearRegionLocal()`, just after the `doAfterClear()`, and guarded with a check on the size of `clearedBuckets`? i.e. if no buckets are cleared, do not increment the stats? That should avoid having to do quite so much checking in the method itself and instead place the focus on calling it in the appropriate place, where it will always increment the stats. ## File path: geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearDUnitTest.java ## @@ -330,6 +337,101 @@ public void normalClearFromAccessorWithoutWriterButWithWriterOnDataStore() { .isEqualTo(0); } + @Test + public void normalClearFromDataStoreUpdatesStats() { +configureServers(false, true); +client1.invoke(this::initClientCache); +client2.invoke(this::initClientCache); + +// Verify no clears have been recorded in stats +dataStore1.invoke(() -> { + PartitionedRegion region = (PartitionedRegion) getRegion(false); + + for (BucketRegion bucket : region.getDataStore().getAllLocalBucketRegions()) { +long clearCount = bucket.getCachePerfStats().getRegionClearCount(); +assertThat(clearCount).isEqualTo(0); + } +}); + +accessor.invoke(() -> feed(false)); +verifyServerRegionSize(NUM_ENTRIES); +dataStore1.invoke(() -> getRegion(false).clear()); +verifyServerRegionSize(0); + +// Verify the stats were properly updated for the bucket regions +dataStore1.invoke(() -> { + PartitionedRegion region = (PartitionedRegion) getRegion(false); + long clearCount = 0L; + + for (BucketRegion bucket : region.getDataStore().getAllLocalBucketRegions()) { +if (clearCount == 0) { + clearCount = bucket.getCachePerfStats().getBucketClearCount(); +} + assertThat(bucket.getCachePerfStats().getBucketClearCount()).isEqualTo(clearCount) +.isNotEqualTo(0); + } + + assertThat(region.getCachePerfStats().getRegionClearCount()).isEqualTo(1); + assertThat(region.getCachePerfStats().getPartitionedRegionClearDuration()).isGreaterThan(0); +}); + +dataStore2.invoke(() -> { + PartitionedRegion region =
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17166989#comment-17166989 ] ASF GitHub Bot commented on GEODE-7846: --- lgtm-com[bot] commented on pull request #5391: URL: https://github.com/apache/geode/pull/5391#issuecomment-664693424 This pull request **introduces 1 alert** when merging 1a75cf26fe7624f14f359dd5bad675f5b0bcf0ea into b941d7fe7fb0df69636fbb7847899d10cf281dea - [view on LGTM.com](https://lgtm.com/projects/g/apache/geode/rev/pr-0b1476895268dd285593411c79bd4970acefb804) **new alerts:** * 1 for Boxed variable is never null 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Clear in Partitioned Region should have its own stats > - > > Key: GEODE-7846 > URL: https://issues.apache.org/jira/browse/GEODE-7846 > Project: Geode > Issue Type: Improvement > Components: core >Reporter: Xiaojian Zhou >Priority: Major > Labels: GeodeCommons, GeodeOperationAPI, pull-request-available > > Clear operation in PR should have its own stats: > 1) clear operation executed. > 2) clear operation failed > 3) clear messages sends to buckets -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17166997#comment-17166997 ] ASF GitHub Bot commented on GEODE-7846: --- BenjaminPerryRoss commented on a change in pull request #5391: URL: https://github.com/apache/geode/pull/5391#discussion_r461218632 ## File path: geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java ## @@ -162,6 +162,7 @@ protected void waitForPrimary(PartitionedRegion.RetryTimeKeeper retryTimer) { doAfterClear(regionEvent); } } +incClearCount(); Review comment: This is part of a larger discussion about what we're actually trying to record with the duration. It's something Gester and I have touched on in the operations standup and I'll probably put something up regarding it in the slack channel but basically the duration in the initial version (the one you commented on) was measuring the total duration of the entire clear operation from the perspective of the coordinator. The way it's been changed to (in line with your suggestion) is to move it into the actual local clear. This makes the stat present on all members which have the region (as long as they have data) but it means that this value ONLY captures the actual process of clearing the region and not any of the stuff that happens in between (messaging, any work done on the coordinator other than the local clear, etc). For now it's been changed to something that matches with your thought process here, but if you have ideas on this I would love to hear them. ## File path: geode-core/src/main/java/org/apache/geode/internal/cache/CachePerfStats.java ## @@ -442,7 +451,10 @@ f.createIntCounter("retries", "Number of times a concurrent destroy followed by a create has caused an entry operation to need to retry.", "operations"), -f.createLongCounter("clears", clearsDesc, "operations"), +f.createLongCounter("regionClears", regionClearsDesc, "operations"), Review comment: Agreed. I recall there was a documentation story for PR clear, but I'm not sure what happened to it. I'll hunt it down and if this documentation isn't covered by it I'll make sure to add it to this PR. ## File path: geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java ## @@ -367,12 +370,38 @@ void doClear(RegionEventImpl regionEvent, boolean cacheWrite) { releaseLockForClear(regionEvent); } } - } finally { releaseDistributedClearLock(lockName); + incClearDuration(System.nanoTime() - clearStartTime); +} + } + + void incClearCount() { +if (partitionedRegion != null && partitionedRegion.getDataStore() != null +&& partitionedRegion.getDataStore().getAllLocalBucketRegions() != null +&& partitionedRegion.getDataStore().getAllLocalBucketRegions().size() != 0) { + CachePerfStats stats = partitionedRegion.getCachePerfStats(); + if (stats != null) { +logger.info("BR inc PR Region count:" + stats.getClass().getName() + ":" Review comment: Done ## File path: geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java ## @@ -367,12 +370,38 @@ void doClear(RegionEventImpl regionEvent, boolean cacheWrite) { releaseLockForClear(regionEvent); } } - } finally { releaseDistributedClearLock(lockName); + incClearDuration(System.nanoTime() - clearStartTime); +} + } + + void incClearCount() { +if (partitionedRegion != null && partitionedRegion.getDataStore() != null +&& partitionedRegion.getDataStore().getAllLocalBucketRegions() != null +&& partitionedRegion.getDataStore().getAllLocalBucketRegions().size() != 0) { + CachePerfStats stats = partitionedRegion.getCachePerfStats(); + if (stats != null) { +logger.info("BR inc PR Region count:" + stats.getClass().getName() + ":" ++ partitionedRegion.getFullPath(), new Exception()); +stats.incClearCount(); + } } } + void incClearDuration(long durationNanos) { +if (partitionedRegion != null && partitionedRegion.getTotalNumberOfBuckets() != 0) { + CachePerfStats stats = partitionedRegion.getCachePerfStats(); + if (stats != null) { +logger.info("BR inc PR Duration by + " + durationNanos + " ns:" + stats.getClass().getName() Review comment: Done. ## File path: geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java ## @@ -367,12 +370,38 @@ void doClear(RegionEventImpl regionEvent, boolean cacheWrite) { releaseLockForClear(regionEvent); } } - } finally { releaseDistributedClearLock(lockName); +
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17163822#comment-17163822 ] ASF GitHub Bot commented on GEODE-7846: --- DonalEvans commented on a change in pull request #5391: URL: https://github.com/apache/geode/pull/5391#discussion_r459601065 ## File path: geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java ## @@ -162,6 +162,7 @@ protected void waitForPrimary(PartitionedRegion.RetryTimeKeeper retryTimer) { doAfterClear(regionEvent); } } +incClearCount(); Review comment: I feel like the calls to `incClearCount()` and `incClearDuration()` should be made at the same time, since there should be a consistent approach to when a clear is "done." ## File path: geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java ## @@ -367,12 +370,38 @@ void doClear(RegionEventImpl regionEvent, boolean cacheWrite) { releaseLockForClear(regionEvent); } } - } finally { releaseDistributedClearLock(lockName); + incClearDuration(System.nanoTime() - clearStartTime); +} + } + + void incClearCount() { +if (partitionedRegion != null && partitionedRegion.getDataStore() != null +&& partitionedRegion.getDataStore().getAllLocalBucketRegions() != null +&& partitionedRegion.getDataStore().getAllLocalBucketRegions().size() != 0) { + CachePerfStats stats = partitionedRegion.getCachePerfStats(); + if (stats != null) { +logger.info("BR inc PR Region count:" + stats.getClass().getName() + ":" ++ partitionedRegion.getFullPath(), new Exception()); +stats.incClearCount(); + } } } + void incClearDuration(long durationNanos) { +if (partitionedRegion != null && partitionedRegion.getTotalNumberOfBuckets() != 0) { Review comment: See my other comment about the possibility of hitting the scenario being checked for. Is it actually possible that we get to where this method is called and `getTotalNumberOfBuckets()` is zero? If it is, do we want to throw an exception instead of just quietly not incrementing the stats? ## File path: geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java ## @@ -367,12 +370,38 @@ void doClear(RegionEventImpl regionEvent, boolean cacheWrite) { releaseLockForClear(regionEvent); } } - } finally { releaseDistributedClearLock(lockName); + incClearDuration(System.nanoTime() - clearStartTime); +} + } + + void incClearCount() { +if (partitionedRegion != null && partitionedRegion.getDataStore() != null +&& partitionedRegion.getDataStore().getAllLocalBucketRegions() != null +&& partitionedRegion.getDataStore().getAllLocalBucketRegions().size() != 0) { + CachePerfStats stats = partitionedRegion.getCachePerfStats(); + if (stats != null) { +logger.info("BR inc PR Region count:" + stats.getClass().getName() + ":" ++ partitionedRegion.getFullPath(), new Exception()); +stats.incClearCount(); + } } } + void incClearDuration(long durationNanos) { +if (partitionedRegion != null && partitionedRegion.getTotalNumberOfBuckets() != 0) { + CachePerfStats stats = partitionedRegion.getCachePerfStats(); + if (stats != null) { +logger.info("BR inc PR Duration by + " + durationNanos + " ns:" + stats.getClass().getName() Review comment: Remove this logging. ## File path: geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java ## @@ -367,12 +370,38 @@ void doClear(RegionEventImpl regionEvent, boolean cacheWrite) { releaseLockForClear(regionEvent); } } - } finally { releaseDistributedClearLock(lockName); + incClearDuration(System.nanoTime() - clearStartTime); +} + } + + void incClearCount() { +if (partitionedRegion != null && partitionedRegion.getDataStore() != null +&& partitionedRegion.getDataStore().getAllLocalBucketRegions() != null +&& partitionedRegion.getDataStore().getAllLocalBucketRegions().size() != 0) { Review comment: I'm not sure that all these null checks are required. I would think that if the region is null at this point, then we would expect that something has gone wrong and that we should throw an exception rather than just silently not incrementing the stats. Also, I'm not sure I understand why we only increment the stats if `getAllLocalBucketRegions()` returns a non-empty set. Are there scenarios where we could call clear, it could complete without an exception, bringing us to this method, and then `getAllLocalBucketRegions()` returns empty? ## File path:
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17162351#comment-17162351 ] ASF GitHub Bot commented on GEODE-7846: --- BenjaminPerryRoss opened a new pull request #5391: URL: https://github.com/apache/geode/pull/5391 Thank you for submitting a contribution to Apache Geode. In order to streamline the review of the contribution we ask you to ensure the following steps have been taken: ### For all changes: - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message? - [ ] Has your PR been rebased against the latest commit within the target branch (typically `develop`)? - [ ] Is your initial contribution a single, squashed commit? - [ ] Does `gradlew build` run cleanly? - [ ] Have you written or updated unit tests to verify your changes? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? ### Note: Please ensure that once the PR is submitted, check Concourse for build issues and submit an update to your PR as soon as possible. If you need help, please send an email to d...@geode.apache.org. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Clear in Partitioned Region should have its own stats > - > > Key: GEODE-7846 > URL: https://issues.apache.org/jira/browse/GEODE-7846 > Project: Geode > Issue Type: Improvement > Components: core >Reporter: Xiaojian Zhou >Priority: Major > Labels: GeodeCommons > > Clear operation in PR should have its own stats: > 1) clear operation executed. > 2) clear operation failed > 3) clear messages sends to buckets -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17129486#comment-17129486 ] ASF GitHub Bot commented on GEODE-7846: --- DonalEvans commented on pull request #5157: URL: https://github.com/apache/geode/pull/5157#issuecomment-640849262 This PR was accidentally mis-named. It should read GEODE-78**64**... 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Clear in Partitioned Region should have its own stats > - > > Key: GEODE-7846 > URL: https://issues.apache.org/jira/browse/GEODE-7846 > Project: Geode > Issue Type: Improvement > Components: core >Reporter: Xiaojian Zhou >Priority: Major > Labels: GeodeCommons > > Clear operation in PR should have its own stats: > 1) clear operation executed. > 2) clear operation failed > 3) clear messages sends to buckets -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17118876#comment-17118876 ] ASF subversion and git services commented on GEODE-7846: Commit 0fd56e418752c14ed8ebebe5a370164034aafc39 in geode's branch refs/heads/develop from Donal Evans [ https://gitbox.apache.org/repos/asf?p=geode.git;h=0fd56e4 ] GEODE-7846: Replace all uses of hardcoded / with Region.SEPARATOR (#5157) Authored-by: Donal Evans > Clear in Partitioned Region should have its own stats > - > > Key: GEODE-7846 > URL: https://issues.apache.org/jira/browse/GEODE-7846 > Project: Geode > Issue Type: Improvement > Components: core >Reporter: Xiaojian Zhou >Priority: Major > Labels: GeodeCommons > > Clear operation in PR should have its own stats: > 1) clear operation executed. > 2) clear operation failed > 3) clear messages sends to buckets -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17118875#comment-17118875 ] ASF GitHub Bot commented on GEODE-7846: --- DonalEvans merged pull request #5157: URL: https://github.com/apache/geode/pull/5157 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Clear in Partitioned Region should have its own stats > - > > Key: GEODE-7846 > URL: https://issues.apache.org/jira/browse/GEODE-7846 > Project: Geode > Issue Type: Improvement > Components: core >Reporter: Xiaojian Zhou >Priority: Major > Labels: GeodeCommons > > Clear operation in PR should have its own stats: > 1) clear operation executed. > 2) clear operation failed > 3) clear messages sends to buckets -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-7846) Clear in Partitioned Region should have its own stats
[ https://issues.apache.org/jira/browse/GEODE-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17115678#comment-17115678 ] ASF GitHub Bot commented on GEODE-7846: --- DonalEvans opened a new pull request #5157: URL: https://github.com/apache/geode/pull/5157 Authored-by: Donal Evans Thank you for submitting a contribution to Apache Geode. In order to streamline the review of the contribution we ask you to ensure the following steps have been taken: ### For all changes: - [x] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message? - [x] Has your PR been rebased against the latest commit within the target branch (typically `develop`)? - [x] Is your initial contribution a single, squashed commit? - [x] Does `gradlew build` run cleanly? - [N/A] Have you written or updated unit tests to verify your changes? - [N/A] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? ### Note: Please ensure that once the PR is submitted, check Concourse for build issues and submit an update to your PR as soon as possible. If you need help, please send an email to d...@geode.apache.org. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Clear in Partitioned Region should have its own stats > - > > Key: GEODE-7846 > URL: https://issues.apache.org/jira/browse/GEODE-7846 > Project: Geode > Issue Type: Improvement > Components: core >Reporter: Xiaojian Zhou >Priority: Major > Labels: GeodeCommons > > Clear operation in PR should have its own stats: > 1) clear operation executed. > 2) clear operation failed > 3) clear messages sends to buckets -- This message was sent by Atlassian Jira (v8.3.4#803005)