mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-02 14:03:06 +00:00
fix: detach partition (#3535)
* fix to make sure partitions get properly detached
This commit is contained in:
parent
75375111ac
commit
a7efee2620
@ -1348,7 +1348,10 @@ proc removePartition(
|
||||
"ALTER TABLE messages DETACH PARTITION " & partitionName & " CONCURRENTLY;"
|
||||
debug "removeOldestPartition", query = detachPartitionQuery
|
||||
(await self.performWriteQuery(detachPartitionQuery)).isOkOr:
|
||||
if ($error).contains("FINALIZE"):
|
||||
debug "detected error when trying to detach partition", error
|
||||
|
||||
if ($error).contains("FINALIZE") or
|
||||
($error).contains("already pending detach in part"):
|
||||
## We assume the database is suggesting to use FINALIZE when detaching a partition
|
||||
let detachPartitionFinalizeQuery =
|
||||
"ALTER TABLE messages DETACH PARTITION " & partitionName & " FINALIZE;"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user