-
Notifications
You must be signed in to change notification settings - Fork 252
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
CQEngine can provide an expiration strategy to prevent the memory space from being used up #287
Comments
The best way to handle that is probably to add a timestamp in your objects
which indicates the time it was added to the collection. Then define an
attribute which reads that timestamp. Then add an index on that attribute.
Then, you can write a query which retrieves objects which were added a long
time ago, and remove those from the collection.
…On Fri 13 Aug 2021, 13:07 shenzhaoquan, ***@***.***> wrote:
I also encountered this problem and added a simple implementation
CapacityLimitedIndexedCollection
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#287 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAVYTCXLEOEKDWC67G2TKL3T4UDJXANCNFSM5BFTFATA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
I don't think this is a good way, because we can't know when to clear them. It is possible that OOM occurred before I triggered the cleanup task. In some cases, users cannot accurately assess how much data is entered into the CQEngine collection. This can easily cause memory overflow problems. A collection with limited capacity can better protect applications using CQEngine. |
CQEngine is for running queries on a dataset. If objects are arbitrarily
removed from the dataset, then queries will return incorrect results, right?
I fail to see how what you propose could be implemented without sacrificing
query correctness.
OTOH, the application might know which objects can be removed safely
without compromising correctness for the particular domain of the
application. So it seems sensible to me to have the application manage that
itself.
…On Tue 17 Aug 2021, 02:53 s_skinny, ***@***.***> wrote:
The best way to handle that is probably to add a timestamp in your objects
which indicates the time it was added to the collection. Then define an
attribute which reads that timestamp. Then add an index on that attribute.
Then, you can write a query which retrieves objects which were added a long
time ago, and remove those from the collection.
… <#m_-8214920636253633578_>
I don't think this is a good way, because we can't know when to clear
them. It is possible that OOM occurred before I triggered the cleanup task.
In some cases, users cannot accurately assess how much data is entered
into the CQEngine collection. This can easily cause memory overflow
problems. A collection with limited capacity can better protect
applications using CQEngine.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#287 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAVYTCQT5L37LXDY5PMQOE3T5G6JRANCNFSM5BFTFATA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
I hope that CQEngine can provide some expiration strategies to prevent the collection from growing
The text was updated successfully, but these errors were encountered: