bruno-roustant commented on code in PR #2012:
URL: https://github.com/apache/solr/pull/2012#discussion_r1359808390


##########
solr/core/src/java/org/apache/solr/update/TransactionLog.java:
##########
@@ -190,14 +205,14 @@ public boolean writePrimitive(Object val) throws 
IOException {
 
         long start = Files.size(tlog);
         channel = FileChannel.open(tlog, StandardOpenOption.READ, 
StandardOpenOption.WRITE);
-        os = Channels.newOutputStream(channel);
-        fos = new FastOutputStream(os, new byte[65536], 0);
-
         if (start > 0) {
           readHeader(null);
+        }

Review Comment:
   Change the order: first read the header, and then open the output stream.
   This does not change this TransactionLog behavior, but it allows an 
extending class to read some metadata in the header and use it to open the 
output stream.



-- 
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-unsubscr...@solr.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to