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

fix(sqllab): race condition when updating same cursor position #30141

Conversation

justinpark
Copy link
Member

SUMMARY

In certain cases, a race condition was observed where the cursor position in the Redux state and the cursor position in the ACE editor would repeatedly update each other.
This commit modifies the behavior to update the position only when the current cursor position differs from the value in the Redux state, in order to prevent this issue.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF


Before:

before--race-cursorposition-condition.mov

After:

No maximum update depth exceeded error thrown

TESTING INSTRUCTIONS

locally

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@dosubot dosubot bot added the sqllab Namespace | Anything related to the SQL Lab label Sep 3, 2024
@michael-s-molina michael-s-molina added the v4.1 Label added by the release manager to track PRs to be included in the 4.1 branch label Sep 4, 2024
@michael-s-molina michael-s-molina merged commit 880d634 into apache:master Sep 4, 2024
37 of 38 checks passed
@michael-s-molina michael-s-molina removed the v4.1 Label added by the release manager to track PRs to be included in the 4.1 branch label Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XS sqllab Namespace | Anything related to the SQL Lab
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants