Skip to content

Commit

Permalink
chore: add code comments for where to use different methods in the fu…
Browse files Browse the repository at this point in the history
…ture

Signed-off-by: Miroslav Gatsanoga <[email protected]>
  • Loading branch information
MiroslavGatsanoga committed Jan 15, 2025
1 parent 8a4cb2c commit 57ac0f6
Showing 1 changed file with 27 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,10 @@ public BlockStreamBucketUploaderMetrics(
*
* @param blocksRetainedCount current number of blocks retained on disk
*/
public void updateBlocksRetainedCount(final long blocksRetainedCount) {
public void updateBlocksRetainedCount(
final long
blocksRetainedCount) { // FUTURE: Once https://github.com/hashgraph/hedera-services/pull/17135/ is
// merged, invoke at the end of the BucketUploadManager.onBlockClosed()
if (blocksRetainedCount < 0) {
log.warn("Received number of retained blocks: {}", blocksRetainedCount);
} else {
Expand All @@ -147,7 +150,10 @@ public void updateBlocksRetainedCount(final long blocksRetainedCount) {
*
* @param blocksUploadedCount current number of uploaded blocks on disk
*/
public void updateBlocksUploadedCount(final long blocksUploadedCount) {
public void updateBlocksUploadedCount(
final long
blocksUploadedCount) { // FUTURE: Once https://github.com/hashgraph/hedera-services/pull/17135/ is
// merged, invoke at the end of the BucketUploadManager.onBlockClosed()
if (blocksUploadedCount < 0) {
log.warn("Received number of uploaded blocks: {}", blocksUploadedCount);
} else {
Expand All @@ -160,7 +166,11 @@ public void updateBlocksUploadedCount(final long blocksUploadedCount) {
*
* @param blocksHashMismatchCount current number of blocks with hash mismatch on disk
*/
public void updateBlocksHashMismatchCount(final long blocksHashMismatchCount) {
public void updateBlocksHashMismatchCount(
final long
blocksHashMismatchCount) { // FUTURE: Once https://github.com/hashgraph/hedera-services/pull/17135/
// is merged, invoke at the end of the
// BucketUploadManager.onBlockClosed()
if (blocksHashMismatchCount < 0) {
log.warn("Received number of hash mismatched blocks: {}", blocksHashMismatchCount);
} else {
Expand All @@ -173,7 +183,9 @@ public void updateBlocksHashMismatchCount(final long blocksHashMismatchCount) {
*
* @param provider the provider of the bucket
*/
public void incrementSuccessfulUploads(final String provider) {
public void incrementSuccessfulUploads(
final String provider) { // FUTURE: Once https://github.com/hashgraph/hedera-services/pull/17135/ is merged,
// invoke in BucketUploadManager.uploadToProvider()
if (!successfulUploads.containsKey(provider)) {
log.warn("Bucket provider {} not found for {} metric", provider, UPLOADS_SUCCESS);
} else {
Expand All @@ -186,7 +198,9 @@ public void incrementSuccessfulUploads(final String provider) {
*
* @param provider the provider of the bucket
*/
public void incrementFailedUploads(final String provider) {
public void incrementFailedUploads(
final String provider) { // FUTURE: Once https://github.com/hashgraph/hedera-services/pull/17135/ is merged,
// invoke in BucketUploadManager.processBlockClosure()
if (!failedUploads.containsKey(provider)) {
log.warn("Bucket provider {} not found for {} metric", provider, UPLOADS_FAILURE);
} else {
Expand All @@ -199,7 +213,9 @@ public void incrementFailedUploads(final String provider) {
*
* @param provider the provider of the bucket
*/
public void incrementHashMismatchedBlocks(final String provider) {
public void incrementHashMismatchedBlocks(
final String provider) { // FUTURE: Once https://github.com/hashgraph/hedera-services/pull/17135/ is merged,
// invoke in BucketUploadManager.uploadToProvider()
if (!hashMismatches.containsKey(provider)) {
log.warn("Bucket provider {} not found for {} metric", provider, HASH_MISMATCH);
} else {
Expand All @@ -213,7 +229,11 @@ public void incrementHashMismatchedBlocks(final String provider) {
* @param provider the provider of the bucket
* @param latency the latest upload latency
*/
public void updateUploadLatency(final String provider, final Duration latency) {
public void updateUploadLatency(
final String provider,
final Duration
latency) { // FUTURE: Once https://github.com/hashgraph/hedera-services/pull/17135/ is merged,
// invoke in BucketUploadManager.uploadToProvider()
if (!uploadLatencies.containsKey(provider)) {
log.warn("Bucket provider {} not found for upload latency metrics", provider);
} else {
Expand Down

0 comments on commit 57ac0f6

Please sign in to comment.