-
Notifications
You must be signed in to change notification settings - Fork 6
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
Use standalone mapper instead of the ORM one #286
Use standalone mapper instead of the ORM one #286
Conversation
Not known, we'll need to investigate. Please file a bug?
Same, please file a bug.
What would be the scope of such a CDI bean? Anyway, you're supposed to create it like documented here: https://quarkus.io/version/main/guides/hibernate-search-standalone-elasticsearch#implementing-the-rest-service
:s Any idea how we could make it easier?
Yeah you'd need to hack something together. E.g. make the entities themselves the "IDs" and have the entity loader be a no-op. Maybe that's what you did... I'll have a look :) |
src/main/java/io/quarkus/search/app/hibernate/GuideLoadingBinder.java
Outdated
Show resolved
Hide resolved
src/main/java/io/quarkus/search/app/hibernate/GuideLoadingBinder.java
Outdated
Show resolved
Hide resolved
src/main/java/io/quarkus/search/app/indexing/IndexingService.java
Outdated
Show resolved
Hide resolved
4ac1a87
to
8c98f1c
Compare
ok 😃 bug reports opened
Yeah, I mean, it is all in the docs and examples; it was just me: oh, I need to implement this interface? ok, IDE, tell me which methods are there, and I'll figure it out from there... instead of READING the doc first !!! 🤦🏻 😄. interface SomeMeaningfullNameHere {
boolean noMoreIds();
List<T> currentIds()
}
// or
interface SomeMeaningfullNameHere {
Optional<List<T>> currentIds(); // and if optional is empty => no more ids...
} and thanks for taking a look at this one!! |
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, feel free to merge if it works :)
And thanks for working on this! |
8c98f1c
to
0381d0d
Compare
I've added a copy of a progress monitor; since we do not know the total ahead of time, the built-in one would log a negative % progress. Hibernate Search isn't really causing the live reload issue (and there's also no live reload in prod). Closing the mapping one shouldn't be a problem, as we have a new container on each deployment. So.. I think we can merge this one and see how it behaves throughout the week. |
Maybe we should add support for "unkwown total size" in Hibernate Search, both in the ID loader and in the default logging monitor?
+1, merging, thanks |
created https://hibernate.atlassian.net/browse/HSEARCH-5180 🙈 |
After your last patch (#288), indexing succeeded, and it looks like it works now: https://search-quarkus-io-dev-search-quarkus-io.apps.ospo-osci.z3b1.p1.openshiftapps.com/api/guides/search?q=orm+elasticsearch BTW, I suspect this PR has lowered the memory footprint of the app significantly... It's hard to say for sure, since OpenShift resource limits and JVM heap size are different between prod and staging, but currently in prod we use 1.5GB after a GC, in staging we use 500MB (also after a GC). If we get even a fraction of this gain, that would be great, but we'll have to think of adjusting OpenShift limits accordingly to actually take advantage of it. |
Let's give it a try while we have most of the week ahead of us 😃🤞🏻 |
Memory usage is down from 1.5GB to 1GB in prod... :D |
fixes #265 (potentially)
While doing this I've noticed that quarkus can now log:
I haven't seen that before 🤔. And I've tried to run on main when calling
/reindex
this log also is logged.Another thing related to the
/reindex
: after a live-reload something gets messed up resulting in:have you seen something like that before? maybe it's a known issue?
also sometimes I see:
but I cannot reproduce this one reliably 🙈 😕
SearchSession
is not exposed through CDI with standalone mappersink.complete();
and spending 15 minutes trying to understand why indexing never stops 😆.Stream
I wonder, whether we could make it simpler to index a stream, rather than pushing ids and then loading "entities"