[ 
https://issues.apache.org/jira/browse/SOLR-18727?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kevin Liang updated SOLR-18727:
-------------------------------
    Description: 
*Context:*
TLOG leader needs to do a hard commit (flushing documents to segments on disk), 
so that TLOG follower nodes and PULL nodes can replicate them and make them 
searchable on those nodes. When a core is created, TLOG replicas specifically 
set `commitWithinSoftCommit` to false thus telling the CommitTracker under 
DirectUpdateHandler2 to treat commitWithins as hard commits. However, there is 
a second constructor of DirectUpdateHandler2 that is used when a core is 
already loaded and a reload is being done, which does not enforce this. 
Reloading of a core is also done as part of a backup restore operation (putting 
the core into read-only mode). As a result, {*}after a collection is restored 
or reloaded on TLOG nodes commitWithin is no longer hard commited to disk thus 
not made searchable by followers{*}. This affects when documents are searchable 
from non-leader nodes

*How to reproduce:*
1. Set up a TLOG/PULL Solr cloud using default Solr config (this would have 
default 10s autoCommit interval and default 1s autoSoftCommit interval)
2. On an existing collection, trigger a reload 
`/api/collections/mycollection/reload`
3. Send updates with commitWithin of 1000 (1 second)
4. Repeatedly query PULL node for new document by id
     a) There should be significantly fewer hard commits in the TLOG leader log 
than would be expected
    b) You would expect the average time for document to be visible is 
commitWithin time + something between 0 and PULL poll interval (half of the 
autoCommit time of 10s). Documents are searchable on PULL nodes closer to 1.5 
autoCommit intervals instead.

  was:
*Context:*
TLOG leader needs to do a hard commit (flushing documents to segments on disk), 
so that TLOG follower nodes and PULL nodes can replicate them and make them 
searchable on those nodes. When a core is created, TLOG replicas specifically 
set `commitWithinSoftCommit` to false thus telling the CommitTracker under 
DirectUpdateHandler2 to treat commitWithins as hard commits. However, there is 
a second constructor of DirectUpdateHandler2 that is used when a core is 
already loaded and a reload is being done, which does not enforce this. 
Reloading of a core is also done as part of a backup restore operation (putting 
the core into read-only mode). As a result, {*}after a collection is restored 
or reloaded on TLOG nodes commitWithin is no longer respected{*}. This affects 
when documents are searchable from non-leader nodes

*How to reproduce:*
1. Set up a TLOG/PULL Solr cloud using default Solr config (this would have 
default 10s autoCommit interval and default 1s autoSoftCommit interval)
2. On an existing collection, trigger a reload 
`/api/collections/mycollection/reload`
3. Send updates with commitWithin of 1000 (1 second)
4. Repeatedly query PULL node for new document by id
     a) There should be significantly fewer hard commits in the TLOG leader log 
than would be expected
    b) You would expect the average time for document to be visible is 
commitWithin time + something between 0 and PULL poll interval (half of the 
autoCommit time of 10s). Documents are searchable on PULL nodes closer to 1.5 
autoCommit intervals instead.


> Reload core forces TLOG to incorrectly use soft commits in commit tracker
> -------------------------------------------------------------------------
>
>                 Key: SOLR-18727
>                 URL: https://issues.apache.org/jira/browse/SOLR-18727
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Kevin Liang
>            Priority: Major
>
> *Context:*
> TLOG leader needs to do a hard commit (flushing documents to segments on 
> disk), so that TLOG follower nodes and PULL nodes can replicate them and make 
> them searchable on those nodes. When a core is created, TLOG replicas 
> specifically set `commitWithinSoftCommit` to false thus telling the 
> CommitTracker under DirectUpdateHandler2 to treat commitWithins as hard 
> commits. However, there is a second constructor of DirectUpdateHandler2 that 
> is used when a core is already loaded and a reload is being done, which does 
> not enforce this. Reloading of a core is also done as part of a backup 
> restore operation (putting the core into read-only mode). As a result, 
> {*}after a collection is restored or reloaded on TLOG nodes commitWithin is 
> no longer hard commited to disk thus not made searchable by followers{*}. 
> This affects when documents are searchable from non-leader nodes
> *How to reproduce:*
> 1. Set up a TLOG/PULL Solr cloud using default Solr config (this would have 
> default 10s autoCommit interval and default 1s autoSoftCommit interval)
> 2. On an existing collection, trigger a reload 
> `/api/collections/mycollection/reload`
> 3. Send updates with commitWithin of 1000 (1 second)
> 4. Repeatedly query PULL node for new document by id
>      a) There should be significantly fewer hard commits in the TLOG leader 
> log than would be expected
>     b) You would expect the average time for document to be visible is 
> commitWithin time + something between 0 and PULL poll interval (half of the 
> autoCommit time of 10s). Documents are searchable on PULL nodes closer to 1.5 
> autoCommit intervals instead.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

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

Reply via email to