mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-26 04:09:50 -05:00
### Does this PR have any customer impact? No ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) Bugfix ### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes) Yes ### Are you introducing any new config? If yes, do you have tests with and without them being set? No ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description The cron job for cursor cleanup on disk was broken since it was declared as a function but the call was done as a procedure. Fix the job command. ---- #### AI description (iteration 1) #### PR Classification This pull request fixes a bug related to the cursor cleanup cron job. #### PR Summary The changes address incorrect scheduling and command syntax for cursor cleanup tasks in different modules. - `/pgmongo/sql/pgmongo--1.104-1--1.105-0.sql`: Added a plpgsql block to conditionally schedule the `helio_cursor_cleanup_task` if it does not exist. - `/oss/pg_documentdb/sql/documentdb--0.104-0--0.104-1.sql`: Updated the cron job syntax for `documentdb_cursor_cleanup_task` to call the correct cleanup function. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
7 lines
296 B
SQL
7 lines
296 B
SQL
|
|
#include "udfs/query/bson_dollar_comparison--0.104-1.sql"
|
|
|
|
-- update the job to use the correct syntax.
|
|
SELECT cron.alter_job(
|
|
(SELECT jobid FROM cron.job WHERE jobname = 'documentdb_cursor_cleanup_task' LIMIT 1),
|
|
command => 'SELECT documentdb_api_internal.cursor_directory_cleanup();'); |