[
https://issues.apache.org/jira/browse/SOLR-17231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17835488#comment-17835488
]
Chris M. Hostetter commented on SOLR-17231:
-------------------------------------------
Creating this issue based on an anecdotal report from a user that when they
tried to add a {{PULL}} replica to an existing collection, they got an error
that looked like this (line numbers are from Solr 9.1.1)...
{noformat}
Caused by: org.apache.solr.common.SolrException: Cannot invoke
"org.apache.solr.update.UpdateLog.bufferUpdates()" because the return value of
"org.apache.solr.update.UpdateHandler.getUpdateLog()" is null
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:1203) ~[?:?]
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:1047) ~[?:?]
at
org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:1590)
~[?:?]
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:1456)
~[?:?]
at
org.apache.solr.handler.admin.CoreAdminOperation.lambda$static$0(CoreAdminOperation.java:113)
~[?:?]
at
org.apache.solr.handler.admin.CoreAdminOperation.execute(CoreAdminOperation.java:410)
~[?:?]
at
org.apache.solr.handler.admin.CoreAdminHandler$CallInfo.call(CoreAdminHandler.java:452)
~[?:?]
at
org.apache.solr.handler.admin.CoreAdminHandler.handleRequestBody(CoreAdminHandler.java:235)
~[?:?]
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:224)
~[?:?]
at
org.apache.solr.servlet.HttpSolrCall.handleAdmin(HttpSolrCall.java:941) ~[?:?]
at
org.apache.solr.servlet.HttpSolrCall.handleAdminRequest(HttpSolrCall.java:893)
~[?:?]
at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:584)
~[?:?]
{noformat}
...based on the line numbers, and the NPE details, I asked if it was possible
that the collection was in the middle of a {{RESTORE}} or {{SPLITSHARD}} and
they confirmed that the collection was still in the middle of a {{RESTORE}} ,
which they hadn't realized when they tried to add the replica.
> SolrCore.bufferUpdatesIfConstructing fails on PULL replicas
> -----------------------------------------------------------
>
> Key: SOLR-17231
> URL: https://issues.apache.org/jira/browse/SOLR-17231
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: Chris M. Hostetter
> Priority: Major
>
> If a "Slice" is in the {{CONSTRUCTION}} state, then SolrCore initialization
> for replicas of that Slice try to setup update buffering of the {{UpdateLog}}
> – but this makes no sense for {{PULL}} replicas which have no update logs,
> and causes a NPE....
> {code:java}
> private void bufferUpdatesIfConstructing(CoreDescriptor coreDescriptor) {
> ...
> if (slice.getState() == Slice.State.CONSTRUCTION) {
> // set update log to buffer before publishing the core
> getUpdateHandler().getUpdateLog().bufferUpdates();
> }
> }
> {code}
> I believe the fix is just for {{bufferUpdatesIfConstructing}} to check the
> replica type? (or do a null check on {{getUpdateLog()}} ?)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]