Skip to content

Commit e2c75b5

Browse files
committed
Add in Wellington's feedback
1 parent 115a8b3 commit e2c75b5

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/replication/regionserver/MetricsReplicationGlobalSourceSource.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,15 @@ public interface MetricsReplicationGlobalSourceSource extends MetricsReplication
2525
public static final String SOURCE_WAL_READER_EDITS_BUFFER = "source.walReaderEditsBufferUsage";
2626

2727
/**
28-
* Sets the total usage of memory used by edits in memory read from WALs.
28+
* Sets the total usage of memory used by edits in memory read from WALs. The memory represented
29+
* by this usage measure is across peers/sources. For example, we may batch the same WAL edits
30+
* multiple times for the sake of replicating them to multiple peers..
2931
* @param usage The memory used by edits in bytes
3032
*/
3133
void setWALReaderEditsBufferBytes(long usage);
34+
3235
/**
33-
* Returns the size, in bytes, of edits held in memory to be replicated.
36+
* Returns the size, in bytes, of edits held in memory to be replicated across all peers.
3437
*/
3538
long getWALReaderEditsBufferBytes();
3639
}

hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,8 @@ public Path getCurrentPath() {
274274
private boolean checkQuota() {
275275
// try not to go over total quota
276276
if (totalBufferUsed.get() > totalBufferQuota) {
277-
LOG.warn("Can't read more edits from WAL as buffer usage {}B exceeds limit {}B",
278-
totalBufferUsed.get(), totalBufferQuota);
277+
LOG.warn("peer={}, can't read more edits from WAL as buffer usage {}B exceeds limit {}B",
278+
this.source.getPeerId(), totalBufferUsed.get(), totalBufferQuota);
279279
Threads.sleep(sleepForRetries);
280280
return false;
281281
}

0 commit comments

Comments
 (0)