hydrogen666 commented on issue #12419:
URL: https://github.com/apache/lucene/issues/12419#issuecomment-1623167682

   @tang-hi Our Elasticsearch has migrated to Segment replication mechanism, so 
the code runing on the Primary shard and Replica shard is different. The 
replica shard will not construct `IndexWriter` any more.
   
   Thread A starts a primary shard with procedure below
   1. Construct `ConcurrentMergeScheduler`
   2. Consctruct `IndexWriter`
   
   Thread B start a replica shard with precedure below
   1. Deserialize `SegmentInfos` from disk
   2. Start a read-only SearcherManager
   
   In the first step, we will call `SegmentInfos#readCommit` to  deserialize 
`SegmentInfos`, call stack below
   ```
   at org.apache.lucene.index.IndexWriter.<clinit>(IndexWriter.java:6485)
   at 
org.apache.lucene.index.SegmentInfos.parseSegmentInfos(SegmentInfos.java:499)
   at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:364)
   at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:311)
   ```


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