Skip to content

adding checks if the method is already defined#75

Merged
wkirby merged 2 commits into
mainfrom
redefining-prevention
May 28, 2026
Merged

adding checks if the method is already defined#75
wkirby merged 2 commits into
mainfrom
redefining-prevention

Conversation

@egreer
Copy link
Copy Markdown
Contributor

@egreer egreer commented Nov 26, 2024

There is a possibility that if the active record is forked in the middle of initialization when under periods of high load that we define a wrapped method twice where the wrapped_method may be called with the relation = send(unwrapped_method, *args, **kwargs, &block) multiple times.

This change is mostly a prospective fix as it is nearly impossible to replicate not under load.

@egreer egreer requested a review from wkirby November 26, 2024 19:43
@egreer egreer force-pushed the redefining-prevention branch from eb9e530 to 2960a86 Compare December 4, 2025 16:32
@wkirby wkirby merged commit 5c8a232 into main May 28, 2026
6 checks passed
@wkirby wkirby deleted the redefining-prevention branch May 28, 2026 19:12
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.

2 participants