Skip to content
Permalink
Browse files
[NO ISSUE][OTH] Add pending replicate ops in io stats
- user model changes: no
- storage format changes: no
- interface changes: no

Details:

- Include pending replicate ops in the IO stats.

Change-Id: I56213b6d2027d98c2bf973fac5db5316d6e7fd8e
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/13003
Reviewed-by: Murtadha Hubail <mhubail@apache.org>
Reviewed-by: Ali Alsuliman <ali.al.solaiman@gmail.com>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
  • Loading branch information
mhubail committed Aug 27, 2021
1 parent 875b5c0 commit 072ee5035413aedbc252fa63322dad38e30427df
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
@@ -45,6 +45,7 @@ public class DatasetInfo extends Info implements Comparable<DatasetInfo> {
private int numActiveIOOps;
private int pendingFlushes;
private int pendingMerges;
private int pendingReplications;
private long lastAccess;
private boolean isExternal;
private boolean isRegistered;
@@ -82,6 +83,9 @@ public synchronized void declareActiveIOOperation(ILSMIOOperation.LSMIOOperation
case MERGE:
pendingMerges++;
break;
case REPLICATE:
pendingReplications++;
break;
default:
break;
}
@@ -96,6 +100,9 @@ public synchronized void undeclareActiveIOOperation(ILSMIOOperation.LSMIOOperati
case MERGE:
pendingMerges--;
break;
case REPLICATE:
pendingReplications--;
break;
default:
break;
}
@@ -251,4 +258,8 @@ public synchronized int getPendingFlushes() {
public synchronized int getPendingMerges() {
return pendingMerges;
}

public synchronized int getPendingReplications() {
return pendingReplications;
}
}
@@ -562,6 +562,7 @@ public StorageIOStats getDatasetsIOStats() {
for (DatasetResource dsr : datasets.values()) {
stats.addPendingFlushes(dsr.getDatasetInfo().getPendingFlushes());
stats.addPendingMerges(dsr.getDatasetInfo().getPendingMerges());
stats.addPendingReplications(dsr.getDatasetInfo().getPendingReplications());
}
return stats;
}
@@ -22,6 +22,7 @@ public class StorageIOStats {

private int pendingFlushes;
private int pendingMerges;
private int pendingReplications;

public void addPendingFlushes(int pending) {
pendingFlushes += pending;
@@ -31,11 +32,19 @@ public void addPendingMerges(int pending) {
pendingMerges += pending;
}

public void addPendingReplications(int pending) {
pendingReplications += pending;
}

public int getPendingFlushes() {
return pendingFlushes;
}

public int getPendingMerges() {
return pendingMerges;
}

public int getPendingReplications() {
return pendingReplications;
}
}

0 comments on commit 072ee50

Please sign in to comment.