Summary:
Currently, when a DML query gets executed and there is a concurrent DDL on the same table, DocDB can return a schema version mismatch error for the DML query. Sometimes, we just return this error to the client, but under the right conditions, we can catch this error and internally retry the query. If it hits a schema version mismatch error a second time, a `XX000 (internal errror)` code is thrown. This error code is meant for severe conditions (e.g. memory corruption) where it is unsafe to retry the query. However, `schema version mismatch` errors are expected and are safe to retry.
This revision throws error code `40001` whenever a schema version mismatch is encountered.
Jira: DB-12848
Test Plan:
Jenkins
```
./yb_build.sh --java-test 'org.yb.pgsql.TestSchemaVersionMismatch'
```
Reviewers: amartsinchyk, patnaik.balivada, myang
Reviewed By: amartsinchyk, patnaik.balivada, myang
Subscribers: ybase, yql, patnaik.balivada
Differential Revision: https://phorge.dev.yugabyte.com/D38655