-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Import nouveau #4291
Import nouveau #4291
Conversation
java/nouveau/pom.xml
Outdated
@@ -0,0 +1,216 @@ | |||
<!-- | |||
Copyright 2022 Cloudant. All rights reserved. |
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.
stray copyright notice
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.
there are others, too, just leaving this as a placeholder. We probably also don't need a dedicated LICENSE copy
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.
ah oof, yes, I copied from clouseau's pom.xml, my bad
@rnewson this is great, thanks a lot: for sake of easier consumption, it might be useful if you could pull out examples for what index definition and querying looks like in Search2 and Nouveau, so we can compare those easily (both JS and Mango). I think I will prefer the version field (absence means Search2) variant, but I’m not 100% if this maps cleanly to the same _search /_find URL endpoints. |
362abfb
to
7b392e4
Compare
Are the GH workflows working/necessary, if they are not in the root directory after the merge? |
@big-r81 they worked in the original repo when they are at the root. good call, though. we either need to adjust them so they work here or remove them. haven't thought much about it. |
API choices. Currently you can define a nouveau index almost identically to clouseau, the clouseau;
nouveau
the index() function is enhanced for nouveau (https://github.com/rnewson/nouveau#index-function) giving the user better control over the indexing process but the basic shape for clouseau works the same. The alternative proposal is to use a version attribute
This could either be a dreyfus and erlang-side nouveau would be adjusted to take the appropriate subset from the "indexes" object if we went this way. |
1ce2683
to
03bb9c0
Compare
java/nouveau/src/main/java/org/apache/couchdb/nouveau/core/IndexManager.java
Fixed
Show fixed
Hide fixed
@rnewson thanks for the view definition side of things. How would the query URLs look for this? And how do things look like in mango? |
5711426
to
e075520
Compare
3c966e5
to
dc5a285
Compare
JFYI At the moment the feature flags are used for partition queries. However they can be used here as well. In order to make them work the is_nouveau(#index{dbname = Subject}) ->
couch_flags:is_enabled(nouveau, Subject);
is_nouveau(#idx{dbname = Subject}) ->
couch_flags:is_enabled(nouveau, Subject). The configuration for feature flag is done in ini files as follows. [feature_flags]
; This enables nouveau for databases with given prefix.
nouveau||my_database* = true Supporting another type of a subject also supported via EPI. -module(nouveue_plugin_feature_flags).
-export([
rules/0,
subject_key/1
]).
rules() ->
[].
subject_key(#idx{dbname = Subject}) ->
Subject;
subject_key(#index{dbname = Subject}) ->
Subject;
subject_key(_) ->
no_decision. -module(nouveau_epi).
-behaviour(couch_epi_plugin).
....
providers() ->
[
{chttpd_handlers, nouveau_httpd_handlers},
{feature_flags, nouveau_plugin_feature_flags}
].
The only two places in the PR which are hard to do are in |
} | ||
|
||
private Path indexRootPath(final String name) { | ||
final Path result = rootDir.resolve(name).normalize(); |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression
95e2fea
to
9a2a021
Compare
a664669
to
19c93cd
Compare
9fa7e67
to
9dd2e22
Compare
allow legacy -Infinity for lower and Infinity for upper numeric range while supporting * for both.
leaving branch alive as I squashed the history when I merged. some of the commits might be useful for understanding nascent project history. |
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.
Looks like this was merged prematurely?
There were a lot of nice improvements made but the major missing pieces were not addressed as discussed in #4291 (review)
- Mango integration test coverage
- Basic doc deletion tests.
It also doesn't seem like the integration tests are actually run in CI:
[2023-04-22T14:10:15.085Z] NouveauTest [test/elixir/test/nouveau_test.exs]
[2023-04-22T14:10:15.085Z]
[2023-04-22T14:10:15.085Z] PartitionAllDocsTest
[test/elixir/test/partition_all_docs_test.exs]
[2023-04-22T14:10:15.085Z]
* test partition _all_docs with timeout [L#186]
...
The CI nodes now should have java and maven installed, specifically added to help test and maintain nouveau.
Looking over the PR again, another major missing piece I noticed is purge integration.
This PR imports Nouveau, a replacement for the aging dreyfus+clouseau system.
Nouveau is written in pure Java and uses the Dropwizard framework (" a Java framework for developing ops-friendly, high-performance, RESTful web `services") and supports Lucene 9 indexes
dreyfus+clouseau is not touched, nouveau adds new endpoints (
_nouveau
where_search
is for dreyfus).