Skip to content

SOLR-18144: fix schema designer to auto-create .system in 9x#4202

Merged
dsmiley merged 1 commit intoapache:branch_9xfrom
dsmiley:SOLR-18144-fix-schema-designer-9x
Mar 12, 2026
Merged

SOLR-18144: fix schema designer to auto-create .system in 9x#4202
dsmiley merged 1 commit intoapache:branch_9xfrom
dsmiley:SOLR-18144-fix-schema-designer-9x

Conversation

@dsmiley
Copy link
Copy Markdown
Contributor

@dsmiley dsmiley commented Mar 10, 2026

https://issues.apache.org/jira/browse/SOLR-18144

This is actually pretty close to Jan/Eric's first attempt. But the creation is centralized to one new method on ZkController. And the test was updated to show that it can pass without pre-creating the .system collection.

I was about to go with the HTTP path I suggested... but it was gnawing at me that a CloudSolrClient really should be fine/ideal if we can just ensure that .system exists.

The .system collection is only auto-created in specific circumstances.  Those circumstances changed in 9.x.
}

/** Creates the .system collection if it doesn't exist. Returns true iff this created it. */
public boolean createSystemColl() throws Exception {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved from HttpSolrCall to a more suitable place as the same logic now has 2 callers

}
}

private String getBaseUrl(final String collection) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused

}

protected CloudSolrClient cloudClient() {
// create the system collection if it doesn't exist
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doing this here means pretty minimal change to this class

configureCluster(1)
.addConfig(DEFAULT_CONFIGSET_NAME, new File(ExternalPaths.DEFAULT_CONFIGSET).toPath())
.configure();
// SchemaDesignerConfigSetHelper depends on the blob store
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yay; it's tested now.

Copy link
Copy Markdown
Contributor

@epugh epugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@dsmiley dsmiley merged commit 8299d43 into apache:branch_9x Mar 12, 2026
7 checks passed
@dsmiley dsmiley deleted the SOLR-18144-fix-schema-designer-9x branch March 12, 2026 01:54
@mlbiscoc
Copy link
Copy Markdown
Contributor

This test is consistently failing for me on the 9x branch
./gradlew :solr:core:test --tests "org.apache.solr.handler.designer.TestSchemaDesignerConfigSetHelper.testPersistSampleDocs".
I'll take a look tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants