Skip to content

Commit

Permalink
0002578: Staging can clear ready batches which slows initial load
Browse files Browse the repository at this point in the history
it looks like 0 is hard-coded to mean clean everything from staging
  • Loading branch information
erilong committed May 3, 2016
1 parent 869f9cf commit 1803ab9
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -95,7 +95,8 @@ public long clean(long ttlInMs) {
if (resource != null) {
boolean resourceIsOld = (System.currentTimeMillis() - resource
.getLastUpdateTime()) > ttlInMs;
if (resource.getState() == State.DONE && (resourceIsOld || !resource.exists())) {
if ((resource.getState() == State.DONE || (resource.getState() == State.READY && ttlInMs == 0))
&& (resourceIsOld || !resource.exists())) {
if (!resource.isInUse()) {
boolean file = resource.isFileResource();
long size = resource.getSize();
Expand Down

1 comment on commit 1803ab9

@nameless-one
Copy link

@nameless-one nameless-one commented on 1803ab9 Jun 30, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably it's broke cleanup => memory leaks due to not cleaned resources after push on push+pull replication. Just set stream.to.file.ttl.ms>0 , now ready batches never cleaned and sooner or later, crash due to memory leak
http://www.symmetricds.org/issues/view.php?id=2657

Please sign in to comment.