You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "szetszwo (via GitHub)" <gi...@apache.org> on 2024/10/23 18:55:40 UTC
[PR] RATIS-2178. Add a log message whenever deleting a RaftLog segment. [ratis]
szetszwo opened a new pull request, #1170:
URL: https://github.com/apache/ratis/pull/1170
See RATIS-2178
--
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@ratis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] RATIS-2178. Add a log message whenever deleting a RaftLog segment. [ratis]
Posted by "szetszwo (via GitHub)" <gi...@apache.org>.
szetszwo merged PR #1170:
URL: https://github.com/apache/ratis/pull/1170
--
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@ratis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] RATIS-2178. Add a log message whenever deleting a RaftLog segment. [ratis]
Posted by "szetszwo (via GitHub)" <gi...@apache.org>.
szetszwo commented on PR #1170:
URL: https://github.com/apache/ratis/pull/1170#issuecomment-2440501569
@OneSizeFitsQuorum , thanks a lot for reviewing this!
--
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@ratis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] RATIS-2178. Add a log message whenever deleting a RaftLog segment. [ratis]
Posted by "szetszwo (via GitHub)" <gi...@apache.org>.
szetszwo commented on code in PR #1170:
URL: https://github.com/apache/ratis/pull/1170#discussion_r1816135523
##########
ratis-server/src/main/java/org/apache/ratis/server/raftlog/segmented/SegmentedRaftLog.java:
##########
@@ -405,12 +405,13 @@ protected CompletableFuture<Long> purgeImpl(long index) {
try (AutoCloseableLock writeLock = writeLock()) {
SegmentedRaftLogCache.TruncationSegments ts = cache.purge(index);
updateSnapshotIndexFromStateMachine();
- LOG.debug("purging segments:{}", ts);
if (ts != null) {
+ LOG.info("{}: {}", getName(), ts);
Task task = fileLogWorker.purge(ts);
return task.getFuture();
}
}
+ LOG.info("{}: purge({}) found nothing to purge.", getName(), index);
Review Comment:
Sure, let's change it to debug.
--
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@ratis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] RATIS-2178. Add a log message whenever deleting a RaftLog segment. [ratis]
Posted by "OneSizeFitsQuorum (via GitHub)" <gi...@apache.org>.
OneSizeFitsQuorum commented on code in PR #1170:
URL: https://github.com/apache/ratis/pull/1170#discussion_r1816000107
##########
ratis-server/src/main/java/org/apache/ratis/server/raftlog/segmented/SegmentedRaftLog.java:
##########
@@ -405,12 +405,13 @@ protected CompletableFuture<Long> purgeImpl(long index) {
try (AutoCloseableLock writeLock = writeLock()) {
SegmentedRaftLogCache.TruncationSegments ts = cache.purge(index);
updateSnapshotIndexFromStateMachine();
- LOG.debug("purging segments:{}", ts);
if (ts != null) {
+ LOG.info("{}: {}", getName(), ts);
Task task = fileLogWorker.purge(ts);
return task.getFuture();
}
}
+ LOG.info("{}: purge({}) found nothing to purge.", getName(), index);
Review Comment:
It seems this line will cause a lot of info log? If we don't actually delete the file here, maybe we don't need to log here
##########
ratis-server/src/main/java/org/apache/ratis/server/raftlog/segmented/SegmentedRaftLogCache.java:
##########
@@ -154,7 +159,8 @@ long maxEndIndex() {
@Override
public String toString() {
- return "toTruncate: " + toTruncate
+ return reason
+ + "\ntoTruncate: " + toTruncate
Review Comment:
\n toTruncate:
--
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@ratis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org