You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/07/13 18:01:28 UTC

[GitHub] [kafka] jsancio opened a new pull request #11040: KAFKA-13078: Closing FileRawSnapshotWriter too early

jsancio opened a new pull request #11040:
URL: https://github.com/apache/kafka/pull/11040


   FollowerState state should close the store fetchingSnapshot if it exists
   instead of the new snapshot begin set.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] mumrah commented on a change in pull request #11040: KAFKA-13078: Closing FileRawSnapshotWriter too early

Posted by GitBox <gi...@apache.org>.
mumrah commented on a change in pull request #11040:
URL: https://github.com/apache/kafka/pull/11040#discussion_r669029695



##########
File path: raft/src/main/java/org/apache/kafka/raft/FollowerState.java
##########
@@ -137,11 +137,11 @@ public boolean updateHighWatermark(OptionalLong highWatermark) {
         return fetchingSnapshot;
     }
 
-    public void setFetchingSnapshot(Optional<RawSnapshotWriter> fetchingSnapshot) {
+    public void setFetchingSnapshot(Optional<RawSnapshotWriter> newSnapshot) {
         if (fetchingSnapshot.isPresent()) {
             fetchingSnapshot.get().close();
         }

Review comment:
       Ok, so previously we were closing whatever snapshot was passed in to `setFetchingSnapshot?` 




-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] jsancio commented on a change in pull request #11040: KAFKA-13078: Closing FileRawSnapshotWriter too early

Posted by GitBox <gi...@apache.org>.
jsancio commented on a change in pull request #11040:
URL: https://github.com/apache/kafka/pull/11040#discussion_r668995851



##########
File path: raft/src/main/java/org/apache/kafka/raft/FollowerState.java
##########
@@ -137,11 +137,11 @@ public boolean updateHighWatermark(OptionalLong highWatermark) {
         return fetchingSnapshot;
     }
 
-    public void setFetchingSnapshot(Optional<RawSnapshotWriter> fetchingSnapshot) {
+    public void setFetchingSnapshot(Optional<RawSnapshotWriter> newSnapshot) {

Review comment:
       Verified that a few of the tests failed without this and the changes to `MockRawSnapshotWriter` in this PR.




-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] cmccabe merged pull request #11040: KAFKA-13078: Closing FileRawSnapshotWriter too early

Posted by GitBox <gi...@apache.org>.
cmccabe merged pull request #11040:
URL: https://github.com/apache/kafka/pull/11040


   


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org