milleruntime commented on pull request #2117:
URL: https://github.com/apache/accumulo/pull/2117#issuecomment-848895402
I found a bug with the writeBuffer method while testing in Uno.
<pre>
2021-05-26T11:00:44,630 [tserver.AssignmentHandler] WARN : exception trying
to assign tablet +r<< null
java.lang.RuntimeException: Error recovering tablet +r<< from log files
at org.apache.accumulo.tserver.tablet.Tablet.<init>(Tablet.java:398)
~[accumulo-tserver-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
at
org.apache.accumulo.tserver.AssignmentHandler.run(AssignmentHandler.java:160)
~[accumulo-tserver-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
at java.lang.Thread.run(Thread.java:829) [?:?]
Caused by: java.io.IOException: java.lang.IllegalStateException: First log
entry value is not OPEN
at
org.apache.accumulo.tserver.log.TabletServerLogger.recover(TabletServerLogger.java:539)
~[accumulo-tserver-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
at
org.apache.accumulo.tserver.TabletServer.recover(TabletServer.java:1148)
~[accumulo-tserver-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
at org.apache.accumulo.tserver.tablet.Tablet.<init>(Tablet.java:357)
~[accumulo-tserver-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
... 2 more
Caused by: java.lang.IllegalStateException: First log entry value is not OPEN
at
org.apache.accumulo.tserver.log.RecoveryLogsIterator.validateFirstKey(RecoveryLogsIterator.java:151)
~[accumulo-tserver-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
at
org.apache.accumulo.tserver.log.RecoveryLogsIterator.getFiles(RecoveryLogsIterator.java:133)
~[accumulo-tserver-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
at
org.apache.accumulo.tserver.log.RecoveryLogsIterator.<init>(RecoveryLogsIterator.java:71)
~[accumulo-tserver-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
at
org.apache.accumulo.tserver.log.SortedLogRecovery.findMaxTabletId(SortedLogRecovery.java:113)
~[accumulo-tserver-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
at
org.apache.accumulo.tserver.log.SortedLogRecovery.findLogsThatDefineTablet(SortedLogRecovery.java:153)
~[accumulo-tserver-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
at
org.apache.accumulo.tserver.log.SortedLogRecovery.recover(SortedLogRecovery.java:299)
~[accumulo-tserver-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
at
org.apache.accumulo.tserver.log.TabletServerLogger.recover(TabletServerLogger.java:537)
~[accumulo-tserver-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
at
org.apache.accumulo.tserver.TabletServer.recover(TabletServer.java:1148)
~[accumulo-tserver-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
at org.apache.accumulo.tserver.tablet.Tablet.<init>(Tablet.java:357)
~[accumulo-tserver-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
... 2 more
</pre>
This is because the entries get flushed in the LogSorter based on
`tserver.sort.buffer.size` but the validation is still being run for each
sorted part. I will have to find a better place to call `validateFirstKey`.
--
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]