Skip to content

Conversation

@ChenSammi
Copy link
Contributor

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

How was this patch tested?

captured metrics from service /jmx endpoint

image

image

private static final String NUM_FILES_AT_LEVEL = "num_files_at_level";
private static final String SIZE_AT_LEVEL = "size_at_level";

private static final String LAST_SEQUENCE_NUMBER = "last_sequence_number";

Choose a reason for hiding this comment

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

Looks straightforward change introducing LAST_SEQUENCE_NUMBER metrics. On similar lines as HistogramData,TickerTypeData,PropertyData we have introduced getLatestSequenceNumber and updating metrics with calling getLatestSequenceNumber via getMetrics.

Copy link

@krishnaasawa1 krishnaasawa1 Apr 12, 2023

Choose a reason for hiding this comment

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

@ArafatKhan2198 @devmadhuu Please Review as metrics related

private static final String NUM_FILES_AT_LEVEL = "num_files_at_level";
private static final String SIZE_AT_LEVEL = "size_at_level";

private static final String LAST_SEQUENCE_NUMBER = "last_sequence_number";
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we also expose wal_ttl in metrics and wal_size ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@devmadhuu , wal_ttl and wal_size value are statically configured value. They can be retrieved from the rocksdb MANIFEST file.

@adoroszlai adoroszlai changed the title HDDS-8400. Expose rocksdb lastest sequence number throw metrics HDDS-8400. Expose rocksdb last sequence number through metrics Apr 12, 2023
Copy link
Member

@ayushtkn ayushtkn left a comment

Choose a reason for hiding this comment

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

Prod code LGTM, is there any scope to extend a test as well, may be just verifying this number gets populated?

@ChenSammi
Copy link
Contributor Author

Prod code LGTM, is there any scope to extend a test as well, may be just verifying this number gets populated?

@ayushtkn , Unfortunately, there is no metrics related integration test in Ozone now. The patch is tested by starting a single node cluster, and fetch the /jmx content of service. We can add the metrics integration test in a follow up JIRA HDDS-8432.

Copy link
Member

@ayushtkn ayushtkn left a comment

Choose a reason for hiding this comment

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

LGTM
Thanx Sammi for creating a followup for adding tests for metrics

@ChenSammi ChenSammi merged commit 7506842 into apache:master Apr 18, 2023
@ChenSammi
Copy link
Contributor Author

Thanks @krishnaasawa1 @devmadhuu @ayushtkn for the code review.

@adoroszlai
Copy link
Contributor

there is no metrics related integration test in Ozone now

We don't need separate tests for metrics. Assertions about metrics should be added to existing tests.

errose28 added a commit to errose28/ozone that referenced this pull request Apr 20, 2023
* master: (440 commits)
  HDDS-8445. Move PlacementPolicy back to SCM (apache#4588)
  HDDS-8335. ReplicationManager: EC Mis and Under replication handlers should handle overloaded exceptions (apache#4593)
  HDDS-8355. Intermittent failure in TestOMRatisSnapshots#testInstallSnapshot (apache#4592)
  HDDS-8444. Increase timeout of CI build (apache#4586)
  HDDS-8446. Selective checks: handle change in ci.yaml (apache#4587)
  HDDS-8440. Ozone Manager crashed with ClassCastException when deleting FSO bucket. (apache#4582)
  HDDS-7309. Enable by default GRPC between S3G and OM (apache#3820)
  HDDS-8458. Mark TestBlockDeletion#testBlockDeletion as flaky
  HDDS-8385. Ozone can't process snapshot when service UID > 2097151 (apache#4580)
  HDDS-8424: Preserve legacy bucket getKeyInfo behavior (apache#4576)
  HDDS-8453. Mark TestDirectoryDeletingServiceWithFSO#testDirDeletedTableCleanUpForSnapshot as flaky
  HDDS-8137. [Snapshot] SnapDiff to use tombstone entries in SST files (apache#4376)
  HDDS-8270. Measure checkAccess latency for Ozone objects (apache#4467)
  HDDS-8109. Seperate Ratis and EC MisReplication Handling (apache#4577)
  HDDS-8429. Checkpoint is not closed properly in OMDBCheckpointServlet (apache#4575)
  HDDS-8253. Set ozone.metadata.dirs to temporary dir if not defined in S3 Gateway (apache#4455)
  HDDS-8400. Expose rocksdb last sequence number through metrics (apache#4557)
  HDDS-8333. ReplicationManager: Allow partial EC reconstruction if insufficient nodes available (apache#4579)
  HDDS-8147. Introduce latency metrics for S3 Gateway operations (apache#4383)
  HDDS-7908. Support OM Metadata operation Generator in `Ozone freon` (apache#4251)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants