dungba88 commented on code in PR #12738:
URL: https://github.com/apache/lucene/pull/12738#discussion_r1378577965


##########
lucene/core/src/java/org/apache/lucene/util/fst/NodeHash.java:
##########
@@ -110,25 +110,34 @@ public long add(FSTCompiler.UnCompiledNode<T> nodeIn) 
throws IOException {
         node = getFallback(nodeIn, hash);
         if (node != 0) {
           // it was already in fallback -- promote to primary
-          primaryTable.set(pos, node);
+          primaryTable.set(pos, node, fallbackTable.getBytes(node));
         } else {
           // not in fallback either -- freeze & add the incoming node
 
           // freeze & add
-          node = fstCompiler.addNode(nodeIn);
+          FSTCompiler<T>.NodeAndBuffer nodeAndBuffer = 
fstCompiler.addNode(nodeIn, true);

Review Comment:
   I was thinking about this too. I can go with this now, just that this means 
it assume the BytesStore still hold those bytes after adding nodes. It kinda 
conflict with the idea of flushing the BytesStore after adding nodes that I had 
in https://github.com/apache/lucene/pull/12624
   
   But I guess we could flush the BytesStore in the beginning of the method 
instead.



-- 
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

Reply via email to