-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[DEPRECATE] SimpleFS in favor of NIOFS #1073
Conversation
start gradle check |
✅ Gradle Wrapper Validation success d9dfc048a1341b2c24ff00793b13aa43e3edf01c |
✅ DCO Check Passed d9dfc048a1341b2c24ff00793b13aa43e3edf01c |
✅ Gradle Precommit success d9dfc048a1341b2c24ff00793b13aa43e3edf01c |
✅ Gradle Check success d9dfc048a1341b2c24ff00793b13aa43e3edf01c |
d9dfc04
to
15e3e4c
Compare
start gradle check |
✅ Gradle Wrapper Validation success 15e3e4cbd3956ddb0c4c16b2fa244cc46ccdfeb3 |
✅ DCO Check Passed 15e3e4cbd3956ddb0c4c16b2fa244cc46ccdfeb3 |
✅ Gradle Precommit success 15e3e4cbd3956ddb0c4c16b2fa244cc46ccdfeb3 |
✅ Gradle Check success 15e3e4cbd3956ddb0c4c16b2fa244cc46ccdfeb3 |
start gradle check |
✅ DCO Check Passed 478ae30c0160d3230712e88f28d24e129e42db0b |
✅ Gradle Wrapper Validation success 478ae30c0160d3230712e88f28d24e129e42db0b |
✅ Gradle Precommit success 478ae30c0160d3230712e88f28d24e129e42db0b |
❌ Gradle Check failure 478ae30c0160d3230712e88f28d24e129e42db0b |
start gradle check |
❌ Gradle Check failure 478ae30c0160d3230712e88f28d24e129e42db0b |
start gradle check |
✅ Gradle Check success 478ae30c0160d3230712e88f28d24e129e42db0b |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 A few minor comments.
What about the usage in the OpenSearch project, are we going to replace those? For instance,
OpenSearch/server/src/main/java/org/opensearch/common/settings/KeyStoreWrapper.java
Line 43 in 4906a3c
import org.apache.lucene.store.SimpleFSDirectory; |
* compatible open source license. | ||
*/ | ||
|
||
package org.opensearch.index.store.smbniofs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the implementations SmbMmapFsDirectoryFactory
, SmbNIOFsDirectoryFactory
and SmbSimpleFsDirectoryFactory
be in the same package something like smbfs
or simply smb
? Similarly for all the test classes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I agree. I think maybe we do that refactor in a followup PR? How about in the removal PR?
@Override | ||
protected Directory newFSDirectory(Path location, LockFactory lockFactory, IndexSettings indexSettings) throws IOException { | ||
DEPRECATION_LOGGER.deprecate(IndexModule.Type.SIMPLEFS.getSettingsKey(), IndexModule.Type.SIMPLEFS.getSettingsKey() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this redundant considering the MetadataCreateIndexService.validateStoreTypeSettings
will log a deprecation message ?
@Override | ||
public Map<String, DirectoryFactory> getDirectoryFactories() { | ||
final Map<String, DirectoryFactory> indexStoreFactories = new HashMap<>(2); | ||
indexStoreFactories.put("smb_mmap_fs", new SmbMmapFsDirectoryFactory()); | ||
DEPRECATION_LOGGER.deprecate(IndexModule.Type.SIMPLEFS.getSettingsKey(), IndexModule.Type.SIMPLEFS.getSettingsKey() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant logging (as commented above)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This message is posted once, when the plugin is loaded and the Factory instance is created. The other message is posted every time the factory.newFSDirectory
is called (which could, though probably unlikely, happen in a user application) to instantiate a new instance of the SimpleFSDirectory. So I think it's worthy having both.
server/src/main/java/org/opensearch/cluster/metadata/MetadataUpdateSettingsService.java
Outdated
Show resolved
Hide resolved
✅ Gradle Wrapper Validation success 6dd13ee8ad07ccde0ade96c35d6eb95c58f8e7e2 |
✅ DCO Check Passed 6dd13ee8ad07ccde0ade96c35d6eb95c58f8e7e2 |
✅ Gradle Precommit success 6dd13ee8ad07ccde0ade96c35d6eb95c58f8e7e2 |
Lucene 9 removes support for SimpleFS File System format. This commit deprecates the SimpleFS format in favor of NIOFS. Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
6bf03cf
to
846f78a
Compare
❌ DCO Check Failed 6bf03cfa224b07c4d06889cca37f7faa70b5dcae |
I was going to leave them for full replacement in the Lucene 9 upgrade, but I think it's a better idea to take care of it now. So that's done |
✅ Gradle Wrapper Validation success 846f78a |
✅ DCO Check Passed 846f78a |
✅ Gradle Precommit success 846f78a |
start gradle check |
Lucene 9 removes support for SimpleFS File System format. This commit deprecates the SimpleFS format in favor of NIOFS. Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
Lucene 9 removes support for SimpleFS File System format. This PR deprecates the SimpleFS format in favor of NIOFS.
resolves #1072