You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iggy.apache.org by gk...@apache.org on 2026/03/03 14:54:17 UTC

(iggy) branch fix_mux_plane_generics updated (24af899c2 -> b0af52de0)

This is an automated email from the ASF dual-hosted git repository.

gkoszyk pushed a change to branch fix_mux_plane_generics
in repository https://gitbox.apache.org/repos/asf/iggy.git


 discard 24af899c2 fix(cluster): fix type mismatch for variadic plane impl
     new b0af52de0 fix(cluster): fix type mismatch for variadic plane impl

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (24af899c2)
            \
             N -- N -- N   refs/heads/fix_mux_plane_generics (b0af52de0)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 core/metadata/src/impls/metadata.rs    |  7 ++-----
 core/partitions/src/iggy_partitions.rs | 15 +++------------
 2 files changed, 5 insertions(+), 17 deletions(-)


(iggy) 01/01: fix(cluster): fix type mismatch for variadic plane impl

Posted by gk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gkoszyk pushed a commit to branch fix_mux_plane_generics
in repository https://gitbox.apache.org/repos/asf/iggy.git

commit b0af52de04038356cb6bfa5f5ac44cb62d5402d3
Author: numinex <g....@gmail.com>
AuthorDate: Tue Mar 3 15:53:10 2026 +0100

    fix(cluster): fix type mismatch for variadic plane impl
---
 core/common/src/macros.rs              |  8 ++++----
 core/metadata/src/impls/metadata.rs    | 12 ++++--------
 core/partitions/src/iggy_partitions.rs | 18 ++++--------------
 core/shard/src/lib.rs                  | 13 ++++++-------
 4 files changed, 18 insertions(+), 33 deletions(-)

diff --git a/core/common/src/macros.rs b/core/common/src/macros.rs
index c7c1ce3f6..09ec4c496 100644
--- a/core/common/src/macros.rs
+++ b/core/common/src/macros.rs
@@ -19,9 +19,9 @@
 macro_rules! variadic {
     () => (());
     (...$a:ident $(,)?) => ($a);
-    (...$a:expr $(,)?) => ($a);
-    ($a:ident $(,)?) => (($a, ()));
-    ($a:expr $(,)?) => (($a, ()));
+    (...$a:ty $(,)?) => ($a);
     ($a:ident, $($b:tt)+) => (($a, $crate::variadic!($($b)+)));
-    ($a:expr, $($b:tt)+) => (($a, $crate::variadic!($($b)+)));
+    ($a:ty, $($b:tt)+) => (($a, $crate::variadic!($($b)+)));
+    ($a:ident $(,)?) => (($a, ()));
+    ($a:ty $(,)?) => (($a, ()));
 }
diff --git a/core/metadata/src/impls/metadata.rs b/core/metadata/src/impls/metadata.rs
index 64f9fe959..e7ce25e83 100644
--- a/core/metadata/src/impls/metadata.rs
+++ b/core/metadata/src/impls/metadata.rs
@@ -100,15 +100,14 @@ pub struct IggyMetadata<C, J, S, M> {
     pub mux_stm: M,
 }
 
-impl<B, P, J, S, M> Plane<VsrConsensus<B, P>> for IggyMetadata<VsrConsensus<B, P>, J, S, M>
+impl<B, J, S, M> Plane<VsrConsensus<B>> for IggyMetadata<VsrConsensus<B>, J, S, M>
 where
     B: MessageBus<Replica = u8, Data = Message<GenericHeader>, Client = u128>,
-    P: Pipeline<Message = Message<PrepareHeader>, Entry = PipelineEntry>,
     J: JournalHandle,
     J::Target: Journal<J::Storage, Entry = Message<PrepareHeader>, Header = PrepareHeader>,
     M: StateMachine<Input = Message<PrepareHeader>>,
 {
-    async fn on_request(&self, message: <VsrConsensus<B, P> as Consensus>::Message<RequestHeader>) {
+    async fn on_request(&self, message: <VsrConsensus<B> as Consensus>::Message<RequestHeader>) {
         let consensus = self.consensus.as_ref().unwrap();
 
         // TODO: Bunch of asserts.
@@ -117,10 +116,7 @@ where
         pipeline_prepare_common(consensus, prepare, |prepare| self.on_replicate(prepare)).await;
     }
 
-    async fn on_replicate(
-        &self,
-        message: <VsrConsensus<B, P> as Consensus>::Message<PrepareHeader>,
-    ) {
+    async fn on_replicate(&self, message: <VsrConsensus<B> as Consensus>::Message<PrepareHeader>) {
         let consensus = self.consensus.as_ref().unwrap();
         let journal = self.journal.as_ref().unwrap();
 
@@ -174,7 +170,7 @@ where
         }
     }
 
-    async fn on_ack(&self, message: <VsrConsensus<B, P> as Consensus>::Message<PrepareOkHeader>) {
+    async fn on_ack(&self, message: <VsrConsensus<B> as Consensus>::Message<PrepareOkHeader>) {
         let consensus = self.consensus.as_ref().unwrap();
         let header = message.header();
 
diff --git a/core/partitions/src/iggy_partitions.rs b/core/partitions/src/iggy_partitions.rs
index f05b294db..6c1ae865c 100644
--- a/core/partitions/src/iggy_partitions.rs
+++ b/core/partitions/src/iggy_partitions.rs
@@ -333,15 +333,11 @@ impl<C> IggyPartitions<C> {
     }
 }
 
-impl<B> Plane<VsrConsensus<B, NamespacedPipeline>>
-    for IggyPartitions<VsrConsensus<B, NamespacedPipeline>>
+impl<B> Plane<VsrConsensus<B>> for IggyPartitions<VsrConsensus<B, NamespacedPipeline>>
 where
     B: MessageBus<Replica = u8, Data = Message<GenericHeader>, Client = u128>,
 {
-    async fn on_request(
-        &self,
-        message: <VsrConsensus<B, NamespacedPipeline> as Consensus>::Message<RequestHeader>,
-    ) {
+    async fn on_request(&self, message: <VsrConsensus<B> as Consensus>::Message<RequestHeader>) {
         let namespace = IggyNamespace::from_raw(message.header().namespace);
         let consensus = self
             .consensus()
@@ -352,10 +348,7 @@ where
         pipeline_prepare_common(consensus, prepare, |prepare| self.on_replicate(prepare)).await;
     }
 
-    async fn on_replicate(
-        &self,
-        message: <VsrConsensus<B, NamespacedPipeline> as Consensus>::Message<PrepareHeader>,
-    ) {
+    async fn on_replicate(&self, message: <VsrConsensus<B> as Consensus>::Message<PrepareHeader>) {
         let header = message.header();
         let namespace = IggyNamespace::from_raw(header.namespace);
         let consensus = self
@@ -397,10 +390,7 @@ where
         }
     }
 
-    async fn on_ack(
-        &self,
-        message: <VsrConsensus<B, NamespacedPipeline> as Consensus>::Message<PrepareOkHeader>,
-    ) {
+    async fn on_ack(&self, message: <VsrConsensus<B> as Consensus>::Message<PrepareOkHeader>) {
         let header = message.header();
         let consensus = self.consensus().expect("on_ack: consensus not initialized");
 
diff --git a/core/shard/src/lib.rs b/core/shard/src/lib.rs
index 0b41b1d84..40161b9cc 100644
--- a/core/shard/src/lib.rs
+++ b/core/shard/src/lib.rs
@@ -26,13 +26,12 @@ use metadata::IggyMetadata;
 use metadata::stm::StateMachine;
 use partitions::IggyPartitions;
 
-// variadic!(Metadata, Partitions) = (Metadata, (Partitions, ()))
-type PlaneInner<B, J, S, M> = (
-    IggyMetadata<VsrConsensus<B>, J, S, M>,
-    (IggyPartitions<VsrConsensus<B, NamespacedPipeline>>, ()),
-);
-
-pub type ShardPlane<B, J, S, M> = MuxPlane<PlaneInner<B, J, S, M>>;
+pub type ShardPlane<B, J, S, M> = MuxPlane<
+    variadic!(
+        IggyMetadata<VsrConsensus<B>, J, S, M>,
+        IggyPartitions<VsrConsensus<B, NamespacedPipeline>>
+    ),
+>;
 
 pub struct IggyShard<B, J, S, M>
 where