mirror of
https://github.com/floci-io/floci.git
synced 2026-11-27 23:59:27 -05:00
CreateDBInstance waited for the Docker backend before answering, so a client with the SDK's default timeouts could retry a create that had already succeeded and get DBInstanceAlreadyExists. It now stores the instance and answers creating, as AWS does. DescribeDBInstances sees the record while a background worker starts the container and proxy outside the instance lock, and the worker publishes the backend only if the same instance is still creating. ModifyDBInstance and RebootDBInstance refuse a creating instance with InvalidDBInstanceState and AWS's messages. A delete accepted during startup keeps the record and the caller's backup choice until the worker has torn down what it started, and after a restart Floci reopens the PostgreSQL volume to save a retained backup before removing it. A state reset waits up to 15 seconds for pending starts and otherwise refuses with 503 from checkReset, before any container stops. Signed-off-by: Jackson Price <jxnprice@amazon.com>