Comments (3)
Hmm, I am not sure.
Which kind of persistence are you using? On-heap/off-heap/disk?
The only blocking that can occur indefinitely as far as I know, is when using off-heap or disk persistence, when the application fails to call ResultSet.close()
when it has finished with the results. Could that be a culprit? If you are using on-heap persistence that should not be a culprit.
from cqengine.
Hi @npgall ,
I see , m working with application on Heap which is base The event loop must never be blocked, if it is then you will exactly that message from above from thrown because the query into the Cqengine took more time than its expected , so our event look report on that as Thread blocked since the response comes back in acceptable time frame.
I tried to work with Data inside the CSV which is around 11K and the response were taking i check it individually around 12 sec with the current implementation.
is there any recommendation base on cqengine documentation with how much data we should work on the CSV ?
is 11K is valid scenario ,if there was benchmarking with such scenario ?
every API has limit if data , does the CQ Engine have such ?
what is the acceptable time that we should get response from the CQEngine when working with Longest Prefix match with the current implementation ?
Regards Fouad Azem
from cqengine.
I see.
I had assumed when you (and that BlockedThreadChecker utility) said the thread is blocked, that you (or it) meant the thread was blocked waiting to acquire some kind of mutex or lock (i.e. indicating there was some kind of deadlock at play).
But based on your last post, it sounds like by "blocked" it means the thread is just busy? So it means your query just has high latency, as opposed to there being some kind of deadlock occurring. Is that the case?
CSV manipulation is not part of CQEngine, so I guess your implementation of attributes might be parsing the CSV?
Generally CQEngine might invoke attributes many times to process a query. It expects the implementation of an attribute to be fast. So if you are doing expensive computations inside attributes (like parsing CSV on-the-fly) that can cause latency.
To reduce latency, consider parsing your CSV into Java objects before you load them into CQEngine, such that your attributes can then just read fields in the objects which will be fast.
If that is not possible, follow the general guidance in the documentation about adding indexes to accelerate your queries.
You could also look at using the "index" merge strategy instead of the default merge strategy.
The "index" merge strategy aims to avoid invoking attributes as much as possible (it assumes invoking them is expensive), and instead it will try to evaluate the query by doing JOINs between indexes under the hood.
Hope that helps. I will close this because I think this is not an issue with CQEngine itself, but rather with CSV parsing. Feel free to reopen if you need more help on the CQEngine side though.
from cqengine.
Related Issues (20)
- Support STRICT_REPLACEMENT in ObjectLockingIndexedCollection/ConcurrentIndexedCollection
- TransactionalIndexedCollection support for UniqueIndex is broken
- Support for attribute accessors for Java record type HOT 1
- Kryo generates InaccessibleObjectException - Make Dependencies "Java 17 compatible"
- Bug in AttributeOrdersComparator HOT 5
- Offheap cache visibility HOT 1
- Support for ANTLR 4.10.1 HOT 12
- Does it support SQL statistics queries HOT 3
- Error while parsing SQL NOT LIKE query HOT 1
- Error while parsing SQL LIKE '%%%' query
- java.lang.IllegalStateException thrown in the getGenericType(Member member) method of AttributeBytecodeGenerator.java
- CQNGrammar Sources missing from master HOT 1
- What is use of sqlite-jdbc in cqengine HOT 2
- Index updated even though objectStore is not modified during IndexedCollection add HOT 2
- Does CQEngine compatible with Java 17 HOT 2
- Issues with Offheap Concurrent Index collection clear()
- Getting below error on jdk17.0.8.8.1
- Is CQEngine officially dead? HOT 5
- com/googlecode/concurrenttrees/radix/node/NodeFactory
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cqengine.