Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADBDEV-4618 Free tuple after use #29

Merged
merged 2 commits into from
Dec 27, 2023
Merged

ADBDEV-4618 Free tuple after use #29

merged 2 commits into from
Dec 27, 2023

Conversation

dnskvlnk
Copy link

@dnskvlnk dnskvlnk commented Dec 20, 2023

refresh_rejectmap looks for a tuple using SearchSysCacheCopy1 which retrieves
a copy of the tuple allocating memory for it. However, refresh_rejectmap didn't
free these tuple copies after use. If lots of oids were passed, diskquota could
work incorrectly because of huge memory leak. This patch frees these tuples and
prevents memory leaks.

src/quotamodel.c Outdated Show resolved Hide resolved
@RekGRpth
Copy link
Member

prevets

prevents

refresh_rejectmap looked for an oid in local cache and retrieved a copy
in a case of success. However, such a tuple should be freed after use,
but refresh_rejectmap didn't do that which resulted in huge memory leak
if there were passed lots of oid, which could result in diskquota
stopping working. This patch frees these tuples and prevents memory leaks
RekGRpth
RekGRpth previously approved these changes Dec 25, 2023
@bimboterminator1
Copy link
Member

@dnskvlnk , I'm ready to approve. Looks good.
But before merging there is a new requirement to align PR description by 80 symbols as well. So, please.

@dnskvlnk dnskvlnk changed the title ADBDEV-4618 Free cache tuple after use ADBDEV-4618 Free tuple after use Dec 27, 2023
src/quotamodel.c Outdated Show resolved Hide resolved
@andr-sokolov andr-sokolov merged commit e30e01c into gpdb Dec 27, 2023
3 checks passed
@andr-sokolov andr-sokolov deleted the ADBDEV-4618 branch December 27, 2023 10:51
@dnskvlnk dnskvlnk restored the ADBDEV-4618 branch January 9, 2024 09:20
@dnskvlnk dnskvlnk deleted the ADBDEV-4618 branch January 9, 2024 09:21
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.

None yet

4 participants