msokolov commented on a change in pull request #657: LUCENE-8781: FST direct 
arc addressing
URL: https://github.com/apache/lucene-solr/pull/657#discussion_r279211075
 
 

 ##########
 File path: lucene/core/src/java/org/apache/lucene/util/fst/FST.java
 ##########
 @@ -632,36 +641,85 @@ long addNode(Builder<T> builder, 
Builder.UnCompiledNode<T> nodeIn) throws IOExce
     if (doFixedArray) {
       final int MAX_HEADER_SIZE = 11; // header(byte) + numArcs(vint) + 
numBytes(vint)
       assert maxBytesPerArc > 0;
-      // 2nd pass just "expands" all arcs to take up a fixed
-      // byte size
+      // 2nd pass just "expands" all arcs to take up a fixed byte size
+
+      // If more than 1/2 of the "slots" would be occupied, write an arc array 
that may have holes in it
 
 Review comment:
   Right it should have said 1/4, and I agree a symbol of some kind is called 
for. I think I'll add a constant, because rIght now the Builder has no (other) 
settable members; in practice every setting is passed on the constructor: it's 
not actually a Builder in the builder-pattern sense, and adding a constructor 
arg will be kind of intrusive given there is not yet any call for it 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]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to