accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] milleruntime commented on a change in pull request #829: Stop creating double OuputStreams for WAL
Date Mon, 17 Dec 2018 20:24:03 GMT
milleruntime commented on a change in pull request #829: Stop creating double OuputStreams
for WAL
URL: https://github.com/apache/accumulo/pull/829#discussion_r242303147
 
 

 ##########
 File path: server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
 ##########
 @@ -443,8 +436,12 @@ public synchronized void open(String address) throws IOException {
       byte[] cryptoParams = encrypter.getDecryptionParameters();
       CryptoUtils.writeParams(cryptoParams, logFile);
 
-      encryptingLogFile = new DataOutputStream(
-          encrypter.encryptStream(new NoFlushOutputStream(logFile)));
+      // write directly to logFile if no crypto detected
+      if (encrypter instanceof NoFileEncrypter) {
+        encryptingLogFile = logFile;
+      } else {
+        encryptingLogFile = new NoFlushOutputStream(encrypter.encryptStream(logFile));
 
 Review comment:
   > I am starting to think the entire no flush thing is suspicious in that it may report
back that things are are flushed to a batch writer when in fact they are not
   
   Same here.  I just saw the WriteAheadLogEncryptedIT Fail because it only read like ~97000/100000
and I wonder if this is why.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message