dungba88 commented on code in PR #12981: URL: https://github.com/apache/lucene/pull/12981#discussion_r1447430604
########## lucene/core/src/java/org/apache/lucene/util/fst/FSTCompiler.java: ########## @@ -164,14 +164,12 @@ private FSTCompiler( boolean allowFixedLengthArcs, DataOutput dataOutput, float directAddressingMaxOversizingFactor, - int version) - throws IOException { + int version) { this.allowFixedLengthArcs = allowFixedLengthArcs; this.directAddressingMaxOversizingFactor = directAddressingMaxOversizingFactor; this.version = version; // pad: ensure no node gets address 0 which is reserved to mean - // the stop state w/ no arcs - dataOutput.writeByte((byte) 0); + // the stop state w/ no arcs. the actual byte will be written lazily Review Comment: numBytesWritten is used for determine the address of the to be written nodes, so if we don't increment it here, it would mess up the address. -- 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...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org