Skip to content

Improvement #7928 : Make TempCacheLimit setting to be per-database, (not per-attachment) for SuperClassic.#7930

Merged
hvlad merged 2 commits intov4.0-releasefrom
work/gh-7928
Dec 19, 2023
Merged

Improvement #7928 : Make TempCacheLimit setting to be per-database, (not per-attachment) for SuperClassic.#7930
hvlad merged 2 commits intov4.0-releasefrom
work/gh-7928

Conversation

@hvlad
Copy link
Copy Markdown
Member

@hvlad hvlad commented Dec 19, 2023

No description provided.

@hvlad hvlad self-assigned this Dec 19, 2023
Comment thread src/jrd/Database.cpp Outdated
return false;

const auto old = m_tempCacheUsage.fetch_add(size);
if (old + size > limit)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Isn't it problematic that someone trying to increase a size and not aquiring it, may temporary avoid that others increase they usage to values that otherwise would be valid?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, it is possible but I doesn't consider it as a problem.
If someone can't allocate the memory, it means the process have a much more serious issue currently.

…methods also.

Cache value of TempCacheLimit setting at global holder, as Dmitry suggests
@hvlad hvlad merged commit 6fed328 into v4.0-release Dec 19, 2023
@hvlad hvlad deleted the work/gh-7928 branch December 19, 2023 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make TempCacheLimit setting to be per-database, (not per-attachment) for SuperClassic.

4 participants