Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOLR-16553 and SOLR-16559 #1185

Merged
merged 2 commits into from Nov 28, 2022
Merged

SOLR-16553 and SOLR-16559 #1185

merged 2 commits into from Nov 28, 2022

Conversation

risdenk
Copy link
Contributor

@risdenk risdenk commented Nov 22, 2022

Contains two commits that are related to fixing the benchmark stuff.

@risdenk risdenk requested a review from janhoy November 22, 2022 18:24
@risdenk risdenk self-assigned this Nov 22, 2022
@risdenk risdenk changed the title SOLR-16553 and SOLR-16553 SOLR-16553 and SOLR-16559 Nov 22, 2022
@@ -476,18 +479,22 @@ private void addFoldersToSharedLib(Set<String> libDirs) {

// Adds modules to shared classpath
private void initModules() {
Path solrInstallDir = getSolrInstallDir();
if (solrInstallDir == null) {
return;
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not a fan of returning null to handle exceptional cases. Why not catch the exception instead?

And certainly not a fan of silenlty returning like this. At the very least, it should do a check to see if any modules are requested, and throw exception if they are but we cannot load them due to, in this case, a configuration error.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think getSolrInstallDir() should return an exception if the property isn't set. Returning null from that method is 100% valid since it is saying "there is no install dir" - initModules and setupSharedLib should handle the case of no install dir. I agree that there should be a message returned in that case if there is no install dir.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@janhoy I pushed a change that gives some more detail in the case of modules and shared lib. Let me know if that looks better for you.

Copy link
Contributor

Choose a reason for hiding this comment

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

This was better, although we'd probably be better off for all tests to also set solr.install.dir and treat lack thereof as a configuration error. But now we at least report why things are failing if it is not set. I'm ok with this too.

Copy link
Contributor

@janhoy janhoy left a comment

Choose a reason for hiding this comment

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

Approving - have only reviewed the solr.install.dir part

@risdenk risdenk merged commit 0717921 into apache:main Nov 28, 2022
@risdenk risdenk deleted the SOLR-16559 branch November 28, 2022 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants