From 45ae97d9376051f1f9e40a91773d696fceffefda Mon Sep 17 00:00:00 2001 From: Priec Date: Fri, 17 Jul 2026 01:22:02 +0200 Subject: [PATCH] multiclient setup3 removing legacy --- Cargo.toml | 2 +- client | 2 +- common/proto/tables_data.proto | 12 ++++++++++++ common/src/grpc_error.rs | 2 -- common/src/proto/descriptor.bin | Bin 99973 -> 100599 bytes common/src/proto/komp_ac.tables_data.rs | 12 ++++++++++++ server | 2 +- 7 files changed, 27 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b8e1ae3..1024dd6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ resolver = "3" [workspace.package] # TODO: idk how to do the name, fix later # name = "komp_ac" -version = "0.8.25" +version = "0.8.26" edition = "2024" license = "GPL-3.0-or-later" authors = ["Filip Priečinský "] diff --git a/client b/client index d0bd9dc..de40eb9 160000 --- a/client +++ b/client @@ -1 +1 @@ -Subproject commit d0bd9dce45c71ea7590a77b7b3d7d456161eae7b +Subproject commit de40eb9a39385e105c4fe09531223f10a65ad1d0 diff --git a/common/proto/tables_data.proto b/common/proto/tables_data.proto index 4d37972..4145d6f 100644 --- a/common/proto/tables_data.proto +++ b/common/proto/tables_data.proto @@ -136,6 +136,9 @@ message PostTableDataResponse { // Rows whose stored script values changed through dependency propagation. repeated RecomputedRow recomputed_rows = 4; + + // Revision committed for the inserted row. + int64 row_revision = 5; } // One row in a bulk insert request. @@ -190,6 +193,9 @@ message PutTableDataRequest { // // Passing an empty map results in a no-op success response. map data = 4; + + // Required. Revision returned when this row was loaded or last saved. + int64 expected_revision = 5; } // Update response. @@ -205,6 +211,9 @@ message PutTableDataResponse { // Rows whose stored script values changed through dependency propagation. repeated RecomputedRow recomputed_rows = 4; + + // Revision committed for the updated row. + int64 row_revision = 5; } message RecomputedRow { @@ -223,6 +232,9 @@ message DeleteTableDataRequest { // Required. Row id to soft-delete. int64 record_id = 3; + + // Required. Revision returned when this row was loaded or last saved. + int64 expected_revision = 4; } // Soft-delete response. diff --git a/common/src/grpc_error.rs b/common/src/grpc_error.rs index b43f69d..0a905df 100644 --- a/common/src/grpc_error.rs +++ b/common/src/grpc_error.rs @@ -1,6 +1,4 @@ pub const ERROR_REASON_METADATA_KEY: &str = "komp-ac-error-reason"; -pub const EXPECTED_ROW_REVISION_METADATA_KEY: &str = "komp-ac-expected-row-revision"; -pub const ROW_REVISION_METADATA_KEY: &str = "komp-ac-row-revision"; pub const COMPUTED_VALUE_MISMATCH_REASON: &str = "computed-value-mismatch"; pub const ROW_STALE_REASON: &str = "row-stale"; pub const ROW_ID_CONFLICT_REASON: &str = "row-id-conflict"; diff --git a/common/src/proto/descriptor.bin b/common/src/proto/descriptor.bin index 0ee5c07b4e75909861cb4b64de380bc313e83cca..7c46e25c6e8ea61e338586fc757bfc0f6a957f46 100644 GIT binary patch delta 2990 zcmb_eTWnNS6rFwM&h4EuEmJOSX$NR8mhzqo1tT%k@>GEsLjB-zLgcXV%e5Rl9)>75@j9)YrHulB6m&((&lOKX2(k{_*@k z|3>;G5FFkuGu#0AE)Kl0g?8pr+rU@*=rfwXN?H~P%eCGiQ4m?|8Lzzq@gqm-5(v<% zjyI}LD=AWD1@yHHnI!{EB8E^cS{jw}Amn%L)8sp^b|0YPoYUlZaw~-VEYwLN5?Ony z@|Ptlx`*=0H617L5=V}K5bva5u7MEmr2GQ;qL#s77m55xg*v~7DpW%a1y=Y4K>}tY zLHbs3Mp}X((M5SP<;z+^xYjv!vWoVWpCcjDcZ3Zqg^CP>!a4F%0sDo3!Z}*7P?jJ< z%e60%?*mmBqj}*A z&`Z%$ye!Zc_GR*Yt}a#6{P1ORX31sH4R8p3>eo0eRnuzVPoMDzCs6A%RRM%rA6JFj zF~Cn!|}>09K;*F!<9`5uc`7Fn8q<{IT{YK#&4diYvdH@ zTnBgv0B6sU9&&BF_I2{zR$C5IQTRGf)^l*o=3Eb|*ALPQ(LvKLFhXe1vL35nf}XmLZ)M0b3;`n zZ!07`omZP1lb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N@MkeyZOF+R1>w}Pj6LxqBnahM7UQeP;=7*Pn%*h3& zxR|uV%Uv=jr2z87c#1Bj%wMOlIXz{w=OQUn@JfR02}zkkX<2Z4Bz*TVB7d6k)4V+% z!>bN%rGz9uZSWBer>5;3a*;yQb`A+CG%XdB*+@u~nP4_{@td_>fvQsL{tRZ4ZJ^2(qygp}$~&sXWs5RkarsZ@34 zr|A8nJ#9WYhZ7gL5dI9wpp2a=VcC*=r?6$9lal-;rNY~nh`tFeRXki$iDmh~;^C62 zstzvW0^jXYk;@8|6*W6goohK;({idMb+oCu>1@+cbGi-1MO}(drc7Lc80$8fHf&CH zTX`;0zFXxVNkYnZtNh(uAh9#%X&bhrGYb^yL`LNwNuD7kqu7Z(tZE^jYsKgKz, + /// Revision committed for the inserted row. + #[prost(int64, tag = "5")] + pub row_revision: i64, } /// One row in a bulk insert request. #[derive(Clone, PartialEq, ::prost::Message)] @@ -126,6 +129,9 @@ pub struct PutTableDataRequest { ::prost::alloc::string::String, ::prost_types::Value, >, + /// Required. Revision returned when this row was loaded or last saved. + #[prost(int64, tag = "5")] + pub expected_revision: i64, } /// Update response. #[derive(Clone, PartialEq, ::prost::Message)] @@ -142,6 +148,9 @@ pub struct PutTableDataResponse { /// Rows whose stored script values changed through dependency propagation. #[prost(message, repeated, tag = "4")] pub recomputed_rows: ::prost::alloc::vec::Vec, + /// Revision committed for the updated row. + #[prost(int64, tag = "5")] + pub row_revision: i64, } #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct RecomputedRow { @@ -164,6 +173,9 @@ pub struct DeleteTableDataRequest { /// Required. Row id to soft-delete. #[prost(int64, tag = "3")] pub record_id: i64, + /// Required. Revision returned when this row was loaded or last saved. + #[prost(int64, tag = "4")] + pub expected_revision: i64, } /// Soft-delete response. #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/server b/server index 3fef1db..86edb1c 160000 --- a/server +++ b/server @@ -1 +1 @@ -Subproject commit 3fef1dbed56512f336626b10979efa6f7d97ab11 +Subproject commit 86edb1ce08134d4b0dc2ace015ae43e216788291