Implement lab 3 replica failover and shared idempotency for grade 4

This commit is contained in:
Алиса Шурман
2026-11-12 22:04:38 +03:00
parent 0ab3a341aa
commit 7da034885f
25 changed files with 1228 additions and 23 deletions
+8
View File
@@ -0,0 +1,8 @@
CREATE TABLE idempotency (
user_id uuid NOT NULL REFERENCES users(id),
chat_id uuid NOT NULL REFERENCES chats(id),
key varchar(128) NOT NULL,
message_id uuid NOT NULL REFERENCES messages(id),
expires_at timestamptz NOT NULL,
PRIMARY KEY(user_id, chat_id, key)
);