Skip to content

Conversation

@ArafatKhan2198
Copy link
Contributor

@ArafatKhan2198 ArafatKhan2198 commented Mar 21, 2023

What changes were proposed in this pull request?

The deleted container count is being fetched to subtract it from the total container count. This is because the count of deleted containers is not relevant for the current state of the cluster, and including it in the total container count would provide misleading information about the number of available containers. Therefore, it is necessary to subtract the deleted container count from the total container count to obtain the actual number of available containers. This adjusted container count is then used to construct the ClusterStateResponse that is returned by the getClusterState() method.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-8127

How was this patch tested?

Tested it manually by deleting containers from the cluster

@ArafatKhan2198
Copy link
Contributor Author

@devmadhuu @sadanand48 @dombizita can you please take a look
Thanks !

@adoroszlai adoroszlai changed the title HDDS-8127. Don't count deleted containers towards Recon container count. HDDS-8127. Exclude deleted containers from Recon container count Mar 22, 2023
@ArafatKhan2198
Copy link
Contributor Author

@sadanand48 @ChenSammi @smengcl can take a look please!

Copy link
Contributor

@sumitagrawl sumitagrawl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ArafatKhan2198 we can combine 3 test class to single

Copy link
Contributor

@sumitagrawl sumitagrawl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ArafatKhan2198 Thanks working on this, LGTM +1

@ChenSammi ChenSammi merged commit eab67e7 into apache:master Apr 4, 2023
@adoroszlai
Copy link
Contributor

@ArafatKhan2198 @ChenSammi @sumitagrawl it looks like a flaky test was introduced here:

Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 11.171 s <<< FAILURE! - in org.apache.hadoop.ozone.recon.api.TestContainerStateCounts
org.apache.hadoop.ozone.recon.api.TestContainerStateCounts.testDeletedContainerCount  Time elapsed: 11.103 s  <<< FAILURE!
org.opentest4j.AssertionFailedError: expected: <5> but was: <2>
	at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
	at org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:150)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:145)
	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:527)
	at org.apache.hadoop.ozone.recon.api.TestContainerStateCounts.testDeletedContainerCount(TestContainerStateCounts.java:383)

https://github.com/adoroszlai/ozone-build-results/blob/master/2023/04/04/21308/unit/hadoop-ozone/recon/org.apache.hadoop.ozone.recon.api.TestContainerStateCounts.txt

errose28 added a commit to errose28/ozone that referenced this pull request Apr 6, 2023
* master: (155 commits)
  update readme (apache#4535)
  HDDS-8374. Disable flaky unit test: TestContainerStateCounts
  HDDS-8016. updated the ozone doc for linked bucket and deletion async limitation (apache#4526)
  HDDS-8237. [Snapshot] loadDb() used by SstFiltering service creates extraneous directories. (apache#4446)
  HDDS-8035. Intermittent timeout in TestOzoneManagerHAWithData.testOMHAMetrics (apache#4362)
  HDDS-8039. Allow container inspector to run from ozone debug. (apache#4337)
  HDDS-8304. [Snapshot] Reduce flakiness in testSkipTrackingWithZeroSnapshot (apache#4487)
  HDDS-7974. [Snapshot] KeyDeletingService to be aware of Ozone snapshots (apache#4486)
  HDDS-8368. ReplicationManager: Create ContainerReplicaOp with correct target Datanode (apache#4532)
  HDDS-8358. Fix the space usage comparator in ContainerBalancerSelectionCriteria (apache#4527)
  HDDS-8359. ReplicationManager: Fix getContainerReplicationHealth() so that it builds ContainerCheckRequest correctly (apache#4528)
  HDDS-8361. Useless object in TestOzoneBlockTokenIdentifier (apache#4517)
  HDDS-8325. Consolidate and refine RocksDB metrics of services (apache#4506)
  HDDS-8135. Incorrect synchronization during certificate renewal in DefaultCertificateClient. (apache#4381)
  HDDS-8127. Exclude deleted containers from Recon container count (apache#4440)
  HDDS-8364. ReadReplicas may give wrong results with topology-aware read enabled (apache#4522)
  HDDS-8354. Avoid WARNING about ObjectEndpoint#get (apache#4515)
  HDDS-8324. DN data cache gets removed randomly asking for data from disk (apache#4499)
  HDDS-8291. Upgrade to Hadoop 3.3.5 (apache#4484)
  HDDS-8355. Mark TestOMRatisSnapshots#testInstallSnapshot as flaky
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants