Skip to content

bug: file leak in object store cache #1458

@killme2008

Description

@killme2008

What type of bug is this?

Other

What subsystems are affected?

Datanode

What happened?

We already implemented an object store cache in #928 , but it has a potential issue.

The LruCachePolicy keeps all active cached items in memory, and if we restart the datanode, those items are lost.We don't recover the cached items from disk when initializing the LRU cache. The cache will be reconstructed by file accessing.

So if a file is not accessed after that at all, the file is leaked on disk forever and may consume too much disk consumption.

What operating system did you use?

All os systems.

Relevant log output and stack trace

No response

How can we reproduce the bug?

  1. Enable the object store caching by setting cache_path in storage config when using s3 or OSS.
  2. Write and read some data.
  3. Restart the datanode(or standalone node).
  4. The files in cache_path may leak.

Metadata

Metadata

Assignees

Labels

C-bugCategory Bugs

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions