Summary:
Currently, when a new connection calls YBCTriggerRelcacheInitConnection, on return it expects to
find a valid relcache init file that is newly generated. However in some of the integration tests it
was found that the newly generated relcache init file may already become obsolete. This happens when
there are back-to-back DDLs. In the given test there were 4 ANALYZE statements executed within 0.5
seconds. As a result, the catalog version was incremented 4 times.
I added a retry loop up to a limit of 20 so that if the relcache init file is already obsolete we
will retry.
Jira: DB-18472
Test Plan:
manually tested by updating ConcurrentNonSuperuserNewConnectionsTest to have a loop to constantly
increment catalog version to reproduce the failure. After the retry fix, no longer see the failure.
I saw a maximum of 4 times of retry so a limit of 20 should be good.
Reviewers: kfranz, sanketh
Reviewed By: sanketh
Subscribers: yql
Differential Revision: https://phorge.dev.yugabyte.com/D47670