-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Allow removal of global configuration properties #3080
Conversation
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.
The changes look good to me in general, but should we briefly mention this in the docs?
Also what about this comment from @robertdale:
If there becomes the ability to clear index.*.backend properties, be sure to document that indexes on that backend would first have to be DISABLE and REMOVE (which effectively disables using that backend).
How will JanusGraph behave if an index backend is configured and in use for some mixed index and the index backend is then removed from the config? Will it still try to use it for traversals that could use that index?
.../src/test/java/org/janusgraph/diskstorage/configuration/UserModifiableConfigurationTest.java
Outdated
Show resolved
Hide resolved
dbd6547
to
0ea6d70
Compare
This definitely needs experiments (or even better, having a test case to showcase that), but AFAIK this will cause read & writes involving that indexing backend to fail. The reason is that schema information is stored in the storage backend, not in the index backend. So JanusGraph will assume the mixed indexes still exist and try connecting to the indexing backend. I think it could be a good improvement to prevent users from removing an index backend in config if there is an active mixed index for that index backend. |
Agreed. We should add tests and update the documentation. Nonetheless, in my understanding, this change is not specific to index backends (it allows removal of any configuration property). In addition, removing an index backend can already be done when using the ConfiguredGraphFactory as shown in this test: cdegroc@e37c9b4. Though, to be fair, I don't think this is documented in the ConfiguredGraphFactory doc. |
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.
I am okay with this PR - What @FlorianHockmann said here made sense, but we could create a follow-up issue for this. For now, my suggestion is that we can:
Rather than this breaking change, add a remove
API and add some Javadoc saying that removal of config might not work properly under all circumstances (e.g. index settings) so use it at your own risk.
After all, it is clear that this functionality is useful in many cases, so some advanced users could still utilize it. We don't want to mention it in the user doc until we have figured out and documented all edge cases.
Thanks @li-boxuan. Adding a The disadvantage is that this API will be different from One issue is that |
That sounds good to me. @FlorianHockmann what do you think? |
Sure, sounds good to me! 👍 |
Just stumbled upon this PR again when looking into the open issues for the 0.6.3 milestone. It's not clear to me any more what we agreed on here exactly 🙁 If I understand our discussion here correctly then what's mostly missing is some addition to the Java docs that explains how this removal works but also warns that it won't work for all options. If you come back to this PR, then it probably also makes sense to change the target branch to This seems to be still open:
Do we want to do this as part of this PR or in a follow-up one? Doing it in a different PR is OK to me, but could you please create an issue for that, @cdegroc? (I think you have a better understanding of this to properly explain what needs to be done.) |
To me it looks like a good feature to have but not a critical bug. Thus, I propose to reschedule this PR to v0.6.4 or 1.0.0. And start 0.6.3 release process. |
I would like to have this PR in 1.0.0, so I am inclined to merge it. We could add an one-liner in release notes that it's a breaking change. Since it's a breaking change, maybe we shouldn't put it in 0.6.4, but I don't have a strong opinion yet. |
Signed-off-by: Clement de Groc <[email protected]>
0ea6d70
to
c7f8d58
Compare
Signed-off-by: Boxuan Li <[email protected]>
c7f8d58
to
3c2fb66
Compare
👋 Sorry for not answering earlier. I'll try to catch up and see if there's anything I can help with. |
Created #4061 to address comments regarding the interface. Let me know what you think. |
Fixes #555
Usage
I've confirmed locally that, once removed, configuration keys can't be retrieved using
ManagementSystem#get()
and don't appear anymore ingraph.getBackend().getGlobalSystemConfig()
.Thank you for contributing to JanusGraph!
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:
master
)?For code changes:
For documentation related changes: