Skip to content

Fix too many dentry cache slab objs#7508.#7509

Merged
fjy merged 1 commit intoapache:masterfrom
kaka11chen:fix-too-many-dentry-cache-slab-objs#7508
Apr 20, 2019
Merged

Fix too many dentry cache slab objs#7508.#7509
fjy merged 1 commit intoapache:masterfrom
kaka11chen:fix-too-many-dentry-cache-slab-objs#7508

Conversation

@kaka11chen
Copy link
Copy Markdown
Contributor

Fix #7508.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

size must actually check the object, and depending on the collection, may have to traverse or do other special record keeping operations. Some collections can optimize this and others cannot. isEmpty() should be used when simply checking for emptyness.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch. Thanks.

@drcrallen
Copy link
Copy Markdown
Contributor

drcrallen commented Apr 19, 2019

There's another hidden FS bug here:

synchronized (files) {
  if (closed) {
    return;
  }
  ...    

If two methods call this, and the first one that finishes causes the JVM to be shut down, then the other one may never finish and actually do the delete. It is at the author's discretion if they want to keep the scope of this PR to just #7508 or to fix up `LimitedTemporaryStorage::close`` in general

If the author wishes to keep the scope limited, then I'm 👍 once the isEmpty change is made

@kaka11chen
Copy link
Copy Markdown
Contributor Author

kaka11chen commented Apr 19, 2019

@drcrallen I have changed the source code with checking a flag createdStorageDirectory.

@fjy fjy added this to the 0.15.0 milestone Apr 20, 2019
@fjy fjy merged commit b59b9ef into apache:master Apr 20, 2019
gianm pushed a commit to implydata/druid-public that referenced this pull request Apr 20, 2019
@clintropolis clintropolis modified the milestones: 0.15.0, 0.14.1 Apr 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Druid historical node running caused os kernel creating too many kernel's dentry slab objects.

4 participants