cybozu-go / moco

MySQL operator on Kubernetes using GTID-based semi-synchronous replication.
https://cybozu-go.github.io/moco/
Apache License 2.0
269 stars 22 forks source link

Long wait for SetReadOnly to complete #708

Open shunki-fujita opened 2 months ago

shunki-fujita commented 2 months ago

Describe the bug SetReadOnly waits for a running DML. Therefore, if it waits for a long time, deleteGracePeriodSeconds may be reached. https://github.com/cybozu-go/moco/blob/c545ebbbab9e92aaf9b07c42263464d9faec50f9/clustering/operations.go#L154-L156

Expected behavior If SetReadOnly does not complete in a short time, give up and run KillConnections.

shunki-fujita commented 4 weeks ago

The problem is that the switching is not completed within the PreStopSeconds time. Solution will be considered separately.