You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2022/01/19 03:51:40 UTC
[GitHub] [bookkeeper] StevenLuMT opened a new pull request #2999: update metrics
StevenLuMT opened a new pull request #2999:
URL: https://github.com/apache/bookkeeper/pull/2999
Descriptions of the changes in this PR:
### Motivation
some metric's value is not right,so update it
the current is problem-driven, and a comprehensive review will be done later.
### Changes
update 3 metric:
1.Bookie: ReadBytes use entrySize
2.Journal: report journal write error metric
3. LedgerFragmentReplicator: numBytesRead use readBytes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] StevenLuMT commented on a change in pull request #2999: update metrics
Posted by GitBox <gi...@apache.org>.
StevenLuMT commented on a change in pull request #2999:
URL: https://github.com/apache/bookkeeper/pull/2999#discussion_r787599583
##########
File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieImpl.java
##########
@@ -1082,7 +1082,8 @@ public ByteBuf readEntry(long ledgerId, long entryId)
LOG.trace("Reading {}@{}", entryId, ledgerId);
}
ByteBuf entry = handle.readEntry(entryId);
- bookieStats.getReadBytes().add(entry.readableBytes());
+ entrySize = entry.readableBytes();
+ bookieStats.getReadBytes().add(entrySize);
success = true;
return entry;
} finally {
Review comment:
this code
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] StevenLuMT commented on a change in pull request #2999: update metrics
Posted by GitBox <gi...@apache.org>.
StevenLuMT commented on a change in pull request #2999:
URL: https://github.com/apache/bookkeeper/pull/2999#discussion_r790369411
##########
File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerFragmentReplicator.java
##########
@@ -395,14 +395,15 @@ public void readComplete(int rc, LedgerHandle lh,
byte[] data = entry.getEntry();
final long dataLength = data.length;
numEntriesRead.inc();
- numBytesRead.registerSuccessfulValue(dataLength);
ByteBufList toSend = lh.getDigestManager()
.computeDigestAndPackageForSending(entryId,
lh.getLastAddConfirmed(), entry.getLength(),
Unpooled.wrappedBuffer(data, 0, data.length));
+ int readBytes = toSend.readableBytes();
Review comment:
> why did you modify this?
> `numBytesRead` tracks the data that have been read
yes, this numBytesRead equal to readableBytes, I rollback this, thanks @nicoloboschi
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] StevenLuMT commented on a change in pull request #2999: update metrics
Posted by GitBox <gi...@apache.org>.
StevenLuMT commented on a change in pull request #2999:
URL: https://github.com/apache/bookkeeper/pull/2999#discussion_r787628133
##########
File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieImpl.java
##########
@@ -1082,7 +1082,8 @@ public ByteBuf readEntry(long ledgerId, long entryId)
LOG.trace("Reading {}@{}", entryId, ledgerId);
}
ByteBuf entry = handle.readEntry(entryId);
- bookieStats.getReadBytes().add(entry.readableBytes());
+ entrySize = entry.readableBytes();
+ bookieStats.getReadBytes().add(entrySize);
Review comment:
> I didn't see the `finally` cause refer the entrySize variable. Can you explain more detail? thanks
I add the code picture
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] StevenLuMT removed a comment on pull request #2999: update metrics
Posted by GitBox <gi...@apache.org>.
StevenLuMT removed a comment on pull request #2999:
URL: https://github.com/apache/bookkeeper/pull/2999#issuecomment-1016301082
rerun failure checks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] StevenLuMT commented on a change in pull request #2999: update metrics
Posted by GitBox <gi...@apache.org>.
StevenLuMT commented on a change in pull request #2999:
URL: https://github.com/apache/bookkeeper/pull/2999#discussion_r787599349
##########
File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieImpl.java
##########
@@ -1082,7 +1082,8 @@ public ByteBuf readEntry(long ledgerId, long entryId)
LOG.trace("Reading {}@{}", entryId, ledgerId);
}
ByteBuf entry = handle.readEntry(entryId);
- bookieStats.getReadBytes().add(entry.readableBytes());
+ entrySize = entry.readableBytes();
+ bookieStats.getReadBytes().add(entrySize);
Review comment:
it's necessary for the finally using it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] nicoloboschi commented on a change in pull request #2999: update metrics
Posted by GitBox <gi...@apache.org>.
nicoloboschi commented on a change in pull request #2999:
URL: https://github.com/apache/bookkeeper/pull/2999#discussion_r789611170
##########
File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerFragmentReplicator.java
##########
@@ -395,14 +395,15 @@ public void readComplete(int rc, LedgerHandle lh,
byte[] data = entry.getEntry();
final long dataLength = data.length;
numEntriesRead.inc();
- numBytesRead.registerSuccessfulValue(dataLength);
ByteBufList toSend = lh.getDigestManager()
.computeDigestAndPackageForSending(entryId,
lh.getLastAddConfirmed(), entry.getLength(),
Unpooled.wrappedBuffer(data, 0, data.length));
+ int readBytes = toSend.readableBytes();
Review comment:
why did you modify this?
`numBytesRead` tracks the data that have been read
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] StevenLuMT removed a comment on pull request #2999: update metrics
Posted by GitBox <gi...@apache.org>.
StevenLuMT removed a comment on pull request #2999:
URL: https://github.com/apache/bookkeeper/pull/2999#issuecomment-1019791476
rerun failure checks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] Shoothzj commented on a change in pull request #2999: update metrics
Posted by GitBox <gi...@apache.org>.
Shoothzj commented on a change in pull request #2999:
URL: https://github.com/apache/bookkeeper/pull/2999#discussion_r787602012
##########
File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieImpl.java
##########
@@ -1082,7 +1082,8 @@ public ByteBuf readEntry(long ledgerId, long entryId)
LOG.trace("Reading {}@{}", entryId, ledgerId);
}
ByteBuf entry = handle.readEntry(entryId);
- bookieStats.getReadBytes().add(entry.readableBytes());
+ entrySize = entry.readableBytes();
+ bookieStats.getReadBytes().add(entrySize);
Review comment:
I didn't see the `finally` cause refer the entrySize variable. Can you explain more detail? thanks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] zymap merged pull request #2999: update metrics
Posted by GitBox <gi...@apache.org>.
zymap merged pull request #2999:
URL: https://github.com/apache/bookkeeper/pull/2999
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] StevenLuMT commented on pull request #2999: update metrics
Posted by GitBox <gi...@apache.org>.
StevenLuMT commented on pull request #2999:
URL: https://github.com/apache/bookkeeper/pull/2999#issuecomment-1018397349
@eolivelli @pkumar-singh @zymap
If you have time, please help me review it, thank you
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] Shoothzj commented on a change in pull request #2999: update metrics
Posted by GitBox <gi...@apache.org>.
Shoothzj commented on a change in pull request #2999:
URL: https://github.com/apache/bookkeeper/pull/2999#discussion_r787586378
##########
File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieImpl.java
##########
@@ -1082,7 +1082,8 @@ public ByteBuf readEntry(long ledgerId, long entryId)
LOG.trace("Reading {}@{}", entryId, ledgerId);
}
ByteBuf entry = handle.readEntry(entryId);
- bookieStats.getReadBytes().add(entry.readableBytes());
+ entrySize = entry.readableBytes();
+ bookieStats.getReadBytes().add(entrySize);
Review comment:
unnecessary change?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] StevenLuMT removed a comment on pull request #2999: update metrics
Posted by GitBox <gi...@apache.org>.
StevenLuMT removed a comment on pull request #2999:
URL: https://github.com/apache/bookkeeper/pull/2999#issuecomment-1017022136
@eolivelli @pkumar-singh @zymap
If you have time, please help me review it, thank you
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] zymap commented on a change in pull request #2999: update metrics
Posted by GitBox <gi...@apache.org>.
zymap commented on a change in pull request #2999:
URL: https://github.com/apache/bookkeeper/pull/2999#discussion_r790561721
##########
File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Journal.java
##########
@@ -397,6 +397,10 @@ public int process(boolean shouldForceWrite) throws IOException {
}
return forceWriteWaiters.size();
+ } catch (Throwable e) {
Review comment:
```suggestion
} catch (IOException e) {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] StevenLuMT commented on a change in pull request #2999: update metrics
Posted by GitBox <gi...@apache.org>.
StevenLuMT commented on a change in pull request #2999:
URL: https://github.com/apache/bookkeeper/pull/2999#discussion_r787599349
##########
File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieImpl.java
##########
@@ -1082,7 +1082,8 @@ public ByteBuf readEntry(long ledgerId, long entryId)
LOG.trace("Reading {}@{}", entryId, ledgerId);
}
ByteBuf entry = handle.readEntry(entryId);
- bookieStats.getReadBytes().add(entry.readableBytes());
+ entrySize = entry.readableBytes();
+ bookieStats.getReadBytes().add(entrySize);
Review comment:
it's necessary to change, for the finally code using it @Shoothzj
<img width="868" alt="image" src="https://user-images.githubusercontent.com/42990025/150113268-b5232afe-4459-4e1e-b6c9-c03e2dea1c3b.png">
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] StevenLuMT commented on pull request #2999: update metrics
Posted by GitBox <gi...@apache.org>.
StevenLuMT commented on pull request #2999:
URL: https://github.com/apache/bookkeeper/pull/2999#issuecomment-1017022136
@eolivelli @pkumar-singh @zymap
If you have time, please help me review it, thank you
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] zymap merged pull request #2999: update metrics
Posted by GitBox <gi...@apache.org>.
zymap merged pull request #2999:
URL: https://github.com/apache/bookkeeper/pull/2999
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] StevenLuMT commented on pull request #2999: update metrics
Posted by GitBox <gi...@apache.org>.
StevenLuMT commented on pull request #2999:
URL: https://github.com/apache/bookkeeper/pull/2999#issuecomment-1016301082
rerun failure checks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] StevenLuMT commented on a change in pull request #2999: update metrics
Posted by GitBox <gi...@apache.org>.
StevenLuMT commented on a change in pull request #2999:
URL: https://github.com/apache/bookkeeper/pull/2999#discussion_r787599349
##########
File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieImpl.java
##########
@@ -1082,7 +1082,8 @@ public ByteBuf readEntry(long ledgerId, long entryId)
LOG.trace("Reading {}@{}", entryId, ledgerId);
}
ByteBuf entry = handle.readEntry(entryId);
- bookieStats.getReadBytes().add(entry.readableBytes());
+ entrySize = entry.readableBytes();
+ bookieStats.getReadBytes().add(entrySize);
Review comment:
it's necessary for the finally using it @Shoothzj
<img width="868" alt="image" src="https://user-images.githubusercontent.com/42990025/150113268-b5232afe-4459-4e1e-b6c9-c03e2dea1c3b.png">
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] StevenLuMT commented on a change in pull request #2999: update metrics
Posted by GitBox <gi...@apache.org>.
StevenLuMT commented on a change in pull request #2999:
URL: https://github.com/apache/bookkeeper/pull/2999#discussion_r787599349
##########
File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieImpl.java
##########
@@ -1082,7 +1082,8 @@ public ByteBuf readEntry(long ledgerId, long entryId)
LOG.trace("Reading {}@{}", entryId, ledgerId);
}
ByteBuf entry = handle.readEntry(entryId);
- bookieStats.getReadBytes().add(entry.readableBytes());
+ entrySize = entry.readableBytes();
+ bookieStats.getReadBytes().add(entrySize);
Review comment:
it's necessary for the finally using it @Shoothzj
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] StevenLuMT commented on a change in pull request #2999: update metrics
Posted by GitBox <gi...@apache.org>.
StevenLuMT commented on a change in pull request #2999:
URL: https://github.com/apache/bookkeeper/pull/2999#discussion_r790369411
##########
File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerFragmentReplicator.java
##########
@@ -395,14 +395,15 @@ public void readComplete(int rc, LedgerHandle lh,
byte[] data = entry.getEntry();
final long dataLength = data.length;
numEntriesRead.inc();
- numBytesRead.registerSuccessfulValue(dataLength);
ByteBufList toSend = lh.getDigestManager()
.computeDigestAndPackageForSending(entryId,
lh.getLastAddConfirmed(), entry.getLength(),
Unpooled.wrappedBuffer(data, 0, data.length));
+ int readBytes = toSend.readableBytes();
Review comment:
> why did you modify this?
> `numBytesRead` tracks the data that have been read
yes, this numBytesRead is equal, I rollback this, thanks @nicoloboschi
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] StevenLuMT commented on pull request #2999: update metrics
Posted by GitBox <gi...@apache.org>.
StevenLuMT commented on pull request #2999:
URL: https://github.com/apache/bookkeeper/pull/2999#issuecomment-1019791476
rerun failure checks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] StevenLuMT commented on pull request #2999: update metrics
Posted by GitBox <gi...@apache.org>.
StevenLuMT commented on pull request #2999:
URL: https://github.com/apache/bookkeeper/pull/2999#issuecomment-1022852460
rerun failure checks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org