rails 7.1: fix re-entrancy issue with marginalia and new connections
new connections run queries to populate the PG type map. if we've recently cleared the columns cache (like when creating a new shard), then calling an attribute method in order to add a marginalia comment will consult the columns hash, and cause a new query... within the configure_connection method, before it has actually been fully configured, and thus will fail trying to access the pg_type_map field for that inner query. avoid the re-entrancy by using direct attribute access, which doesn't need to check the columns_hash Change-Id: Ia98cca14d33d69a552f9c7e40704bc5ef6e4250e Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/350762 Reviewed-by: Isaac Moore <isaac.moore@instructure.com> Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> QA-Review: Cody Cutrer <cody@instructure.com> Product-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
parent
8d090c86df
commit
eac802cbbb
|
@ -33,7 +33,7 @@ if config[:components].present?
|
|||
end
|
||||
|
||||
def job_tag
|
||||
Delayed::Worker.current_job&.tag
|
||||
Delayed::Worker.current_job&.[]("tag")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue