KAFKA-19314 Remove unnecessary code of closing snapshotWriter (#19763)

- Remove redundant close of `snapshotWriter`.
- `snapshotWriter` is already closed by `RaftSnapshotWriter#writer`.

Reviewers: Jhen-Yung Hsu <jhenyunghsu@gmail.com>, Ken Huang
 <s7133700@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
Jing-Jia Hung 2025-05-23 03:57:14 +08:00 committed by GitHub
parent 21afc83f8e
commit bc797b077f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 1 deletions

View File

@ -158,7 +158,6 @@ public class SnapshotEmitter implements SnapshotGenerator.Emitter {
throw e;
} finally {
Utils.closeQuietly(writer, "RaftSnapshotWriter");
Utils.closeQuietly(snapshotWriter.get(), "SnapshotWriter");
}
}
}