Alena0704 commented on code in PR #2060:
URL: https://github.com/apache/cloudberry/pull/2060#discussion_r4196116341


##########
src/test/regress/sql/task.sql:
##########
@@ -49,10 +49,23 @@ alter task vacuum_db database task_dbno user task_cron;
 alter task vacuum_db user hopedoesnotexist;
 
 -- valid interval tasks
+--
+-- These four only exercise the schedule parser, they are never meant to run.
+-- Deactivate each one as soon as it exists: while a second-based task stays
+-- active the scheduler keeps firing it, and every run draws a run id from the
+-- cluster-wide Oid counter (NextRunId -> GetNewOidWithIndex).  A task still
+-- firing later in the same regression run shifts the counter that
+-- oid_wraparound hardcodes, and DROP TASK, which also deletes the task's
+-- pg_task_run_history rows, fails with "tuple concurrently updated" when it
+-- races the run the scheduler is in the middle of recording.
 create task valid_task_1 schedule '1 second' as 'select 1';
+alter task valid_task_1 not active;

Review Comment:
   Fixed in both the main and PAX tests, including the expected files. All four 
CREATE TASK / ALTER TASK … NOT ACTIVE pairs are now enclosed in a single 
transaction, so the scheduler can only observe the committed inactive state.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to