From e3dc8a74ff2769dec49b1def91b71f00cabffefe Mon Sep 17 00:00:00 2001
From: Georgy Moshkin <gmoshkin@picodata.io>
Date: Fri, 5 May 2023 16:35:17 +0300
Subject: [PATCH] chore: more TODOs

---
 src/traft/node.rs          | 1 +
 src/traft/rpc/ddl_apply.rs | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/src/traft/node.rs b/src/traft/node.rs
index 0da99a1282..961db7576a 100644
--- a/src/traft/node.rs
+++ b/src/traft/node.rs
@@ -968,6 +968,7 @@ impl NodeImpl {
                     name: "primary_key".into(),
                     space_id: id,
                     schema_version,
+                    // TODO: fill up parts with defaults/stuff we know
                     parts: primary_key,
                     operable: false,
                     // TODO: support other cases
diff --git a/src/traft/rpc/ddl_apply.rs b/src/traft/rpc/ddl_apply.rs
index 0bf1343993..706b8cb41e 100644
--- a/src/traft/rpc/ddl_apply.rs
+++ b/src/traft/rpc/ddl_apply.rs
@@ -33,6 +33,9 @@ crate::define_rpc_request! {
         let rc = unsafe { ffi::box_txn_begin() };
         assert_eq!(rc, 0, "we're not in a transaction currently");
 
+        // TODO: transaction may have already started, if we're in a process of
+        // creating a big index. If governor sends a repeat rpc request to us we
+        // should handle this correctly
         let res = apply_schema_change(storage, &ddl, pending_schema_version);
         match res {
             Ok(Response::Abort { .. }) | Err(_) => {
-- 
GitLab