JetBrains / JetBrains/Exposed

Removing from entity cache is extremely expensive

Open
#1,121 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
9.3k
Forks
798
Avg merge
4d 2h
Merged PRs (30d)
26

Description

### Issue
[This line](https://github.com/JetBrains/Exposed/blob/ff181e3cfb38b72a007cc05fc7cc80e6ac09318b/exposed-dao/src/main/kotlin/org/jetbrains/exposed/dao/EntityCache.kt#L96) results in the complete eviction of any record that refers to the _table_ of the record being deleted. This means that completely unrelated references are evicted, which is not expected.

### Expected Behavior
Based on the current code, it would be preferable to evict only the references that point to the table of the record being deleted. Even better would be to track objects with references to the record being deleted, and evict only those entries.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.