-
Notifications
You must be signed in to change notification settings - Fork 746
Fix error when executing insert on secondary worker node #8419
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
base: main
Are you sure you want to change the base?
Conversation
@microsoft-github-policy-service agree |
Added check for if its running in recovery progress before returning task placement status.
add private Node pointer null check
add task type check
remove vacuum task check
|
Thanks for this PR, can you add a regress test with the problem ? |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8419 +/- ##
==========================================
- Coverage 88.80% 83.52% -5.28%
==========================================
Files 287 287
Lines 63236 62988 -248
Branches 7927 7878 -49
==========================================
- Hits 56155 52613 -3542
- Misses 4750 7725 +2975
- Partials 2331 2650 +319 🚀 New features to boost your workflow:
|
| Node *privateNode = (Node *) linitial(customScan->custom_private); | ||
| //shoud check privateNode is null ptr | ||
| if (privateNode == NULL){ | ||
| return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be preferable to throw an error here, given that custom_private is unconditionally set in FinalizePlan(). If the list contains a NULL it indicates something has gone wrong before this point. Suggest debugging FinalizePlan() from the point where custom_private is set, and try to determine if the CustomScan node is initialized correctly there and where it changes state to result in the problem here.
|
it seems that we need some new test case to pass the code coverage test |
Issue: #8426
Citus version: master
DESCRIPTION:
set citus.writable_standby_coordinator ="on", when insert values on secondary work node, if the values belong to local shard tables, the plan will run on local node ,this will trigger an error.
this pull request will fix this error, route the plan to correct primary node to execute the insert sql.