nizhikov commented on a change in pull request #8840:
URL: https://github.com/apache/ignite/pull/8840#discussion_r597516046
##########
File path:
modules/core/src/main/java/org/apache/ignite/internal/processors/performancestatistics/PerformanceStatisticsProcessor.java
##########
@@ -278,6 +325,35 @@ private void stopWriter() {
log.info("Performance statistics writer stopped.");
}
+ /** Rotate performance statistics writer. */
+ private void rotateWriter() throws IgniteCheckedException, IOException {
+ try {
+ FilePerformanceStatisticsWriter oldWriter = null;
+
+ synchronized (mux) {
+ if (writer != null) {
+ FilePerformanceStatisticsWriter newWriter = new
FilePerformanceStatisticsWriter(ctx);
+
+ newWriter.start();
+
+ oldWriter = writer;
+
+ writer = newWriter;
+
+ oldWriter.stop();
+ }
+ }
+
+ if (oldWriter != null)
+ log.info("Performance statistics writer rotated[writtenFile="
+ oldWriter.getFile() + "].");
+ }
+ catch (IgniteCheckedException | IOException e) {
+ log.error("Failed to rotate performance statistics writer.", e);
Review comment:
Why do we need to log exception here?
Is it not logged elsewhere?
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]