Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/rust/pre-merge/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ runs:
# Build -p flags for cargo build/test
echo "$CRATES" | sed 's/^/-p /' | tr '\n' ' ' > /tmp/packages.txt
# Build nextest filter expression for cargo nextest run
echo "$CRATES" | sed 's/^/package(/; s/$/)/' | paste -sd ' | ' > /tmp/nextest-filter.txt
echo "$CRATES" | sed 's/^/package(/; s/$/)/' | paste -sd '|' | sed 's/|/ | /g' > /tmp/nextest-filter.txt
echo "::notice::DAG analysis: ${CRATE_COUNT} affected crates (of ${TOTAL_CRATES} total)"
else
echo "::notice::Full workspace affected (${TOTAL_CRATES} crates)"
Expand Down
10 changes: 0 additions & 10 deletions .github/config/components.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,9 @@ components:
paths:
- "core/common/**"

# Leaf crate: zero-copy I/O buffer, depended on by binary_protocol and cluster
rust-iobuf:
depends_on:
- "rust-workspace"
paths:
- "core/iobuf/**"

rust-binary-protocol:
depends_on:
- "rust-workspace" # Protocol is affected by workspace changes
- "rust-iobuf" # binary_protocol depends on iobuf
- "ci-infrastructure" # CI changes trigger full regression
paths:
- "core/binary_protocol/**"
Expand All @@ -80,7 +72,6 @@ components:
rust-cluster:
depends_on:
- "rust-workspace"
- "rust-iobuf" # cluster crates depend on iobuf
- "rust-binary-protocol" # cluster crates depend on binary_protocol
paths:
- "core/clock/**"
Expand All @@ -104,7 +95,6 @@ components:
rust:
depends_on:
- "rust-workspace"
- "rust-iobuf"
- "rust-configs"
- "rust-sdk"
- "rust-common"
Expand Down
17 changes: 2 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ members = [
"core/consensus",
"core/harness_derive",
"core/integration",
"core/iobuf",
"core/journal",
"core/message_bus",
"core/metadata",
Expand Down Expand Up @@ -116,6 +115,7 @@ compio = { version = "0.18.0", features = [
"ws",
"fs",
] }
compio-buf = "0.8.1"
# Pin compio-driver >= 0.11.2 to fix musl compilation (compio-rs/compio#668)
compio-driver = "0.11.4"
configs = { path = "core/configs", version = "0.1.0" }
Expand Down Expand Up @@ -172,7 +172,6 @@ iggy_binary_protocol = { path = "core/binary_protocol", version = "0.10.0" }
iggy_common = { path = "core/common", version = "0.10.0" }
iggy_connector_sdk = { path = "core/connectors/sdk", version = "0.3.0" }
integration = { path = "core/integration" }
iobuf = { path = "core/iobuf" }
journal = { path = "core/journal" }
js-sys = "0.3"
jsonwebtoken = { version = "10.3.0", features = ["rust_crypto"] }
Expand Down
1 change: 0 additions & 1 deletion DEPENDENCIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,6 @@ interpolate_name: 0.2.4, "MIT",
inventory: 0.3.24, "Apache-2.0 OR MIT",
io-uring: 0.7.11, "Apache-2.0 OR MIT",
io_uring_buf_ring: 0.2.3, "MIT",
iobuf: 0.1.0, "Apache-2.0",
ipconfig: 0.3.4, "Apache-2.0 OR MIT",
ipnet: 2.12.0, "Apache-2.0 OR MIT",
iri-string: 0.7.12, "Apache-2.0 OR MIT",
Expand Down
3 changes: 2 additions & 1 deletion core/binary_protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ repository = "https://github.com/apache/iggy"
readme = "../../README.md"

[dependencies]
aligned-vec = { workspace = true }
bytemuck = { workspace = true }
bytes = { workspace = true }
compio-buf = { workspace = true }
enumset = { workspace = true }
iobuf = { workspace = true }
smallvec = { workspace = true }
thiserror = { workspace = true }

Expand Down
File renamed without changes.
10 changes: 8 additions & 2 deletions core/binary_protocol/src/consensus/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
// specific language governing permissions and limitations
// under the License.

use super::iobuf::{Frozen, Owned};
use crate::consensus::{
self, Command2, CommitHeader, ConsensusError, ConsensusHeader, DoViewChangeHeader,
GenericHeader, PrepareHeader, PrepareOkHeader, RequestHeader, StartViewChangeHeader,
StartViewHeader,
};
use iobuf::{Frozen, Owned};
use smallvec::SmallVec;
use std::{marker::PhantomData, mem::size_of};

Expand All @@ -46,13 +46,19 @@ where
fn as_mut_slice(&mut self) -> &mut [u8];
}

pub trait FragmentedBacking<H>: MessageBacking<H> + ResponseBackingKind
mod sealed {
pub trait Sealed {}
}

pub trait FragmentedBacking<H>: MessageBacking<H> + ResponseBackingKind + sealed::Sealed
where
H: ConsensusHeader,
{
fn fragments(&self) -> &[Frozen<MESSAGE_ALIGN>];
}

impl sealed::Sealed for ResponseBacking {}

#[derive(Debug, Clone)]
pub struct RequestBacking {
owned: Owned<MESSAGE_ALIGN>,
Expand Down
14 changes: 14 additions & 0 deletions core/binary_protocol/src/consensus/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,20 @@
mod command;
mod error;
mod header;
// iobuf was moved here verbatim from the former `core/iobuf` crate. Its
// implementation is intentionally untouched for rc2; the existing lints
// predate the move and are tracked as tech debt for a 0.9.x cleanup pass.
#[allow(
private_interfaces,
clippy::missing_errors_doc,
clippy::missing_panics_doc,
clippy::must_use_candidate,
clippy::return_self_not_must_use,
clippy::missing_const_for_fn,
clippy::non_send_fields_in_send_ty,
clippy::use_self
)]
pub mod iobuf;
pub mod message;
mod operation;

Expand Down
1 change: 0 additions & 1 deletion core/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ err_trail = { workspace = true }
human-repr = { workspace = true }
humantime = { workspace = true }
iggy_binary_protocol = { workspace = true }
iobuf = { workspace = true }
lending-iterator = { workspace = true }
moka = { workspace = true }
once_cell = { workspace = true }
Expand Down
1 change: 0 additions & 1 deletion core/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ pub use types::personal_access_tokens::*;
pub use types::segment::Segment;
pub use types::segment_storage::*;
pub use types::send_messages2;
pub use types::send_messages2::*;
pub use types::snapshot::*;
pub use types::stats::*;
pub use types::stream::*;
Expand Down
4 changes: 2 additions & 2 deletions core/common/src/types/send_messages2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

use crate::{INDEX_SIZE, IggyError, random_id, sharding::IggyNamespace};
use bytes::{Bytes, BytesMut};
use iggy_binary_protocol::consensus::iobuf::Owned;
use iggy_binary_protocol::{Message, PrepareHeader, RequestHeader};
use iobuf::Owned;
use std::hash::Hasher;
use twox_hash::XxHash3_64;

Expand Down Expand Up @@ -544,7 +544,7 @@ impl<'a> Iterator for SendMessages2IteratorWithOffsets<'a> {
}
}

pub type FrozenBatchHeader = iobuf::Frozen<MESSAGE_ALIGN>;
pub(crate) type FrozenBatchHeader = iggy_binary_protocol::consensus::iobuf::Frozen<MESSAGE_ALIGN>;

pub fn convert_request_message(
namespace: IggyNamespace,
Expand Down
1 change: 0 additions & 1 deletion core/consensus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ bytemuck = { workspace = true }
bytes = { workspace = true }
iggy_binary_protocol = { workspace = true }
iggy_common = { workspace = true }
iobuf = { workspace = true }
message_bus = { workspace = true }
rand = { workspace = true }
rand_xoshiro = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion core/consensus/src/plane_helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ use crate::{
Consensus, IgnoreReason, Pipeline, PipelineEntry, PlaneKind, PrepareOkOutcome, Sequencer,
Status, VsrConsensus,
};
use iggy_binary_protocol::consensus::iobuf::Owned;
use iggy_binary_protocol::{
Command2, GenericHeader, Message, PrepareHeader, PrepareOkHeader, ReplyHeader,
};
use iobuf::Owned;
use message_bus::MessageBus;
use std::ops::AsyncFnOnce;

Expand Down
26 changes: 0 additions & 26 deletions core/iobuf/Cargo.toml

This file was deleted.

1 change: 0 additions & 1 deletion core/journal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ readme = "../../../README.md"
bytemuck = { workspace = true }
compio = { workspace = true }
iggy_binary_protocol = { workspace = true }
iobuf = { workspace = true }

[dev-dependencies]
tempfile = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion core/journal/src/prepare_journal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
use crate::file_storage::FileStorage;
use crate::{Journal, JournalHandle};
use compio::io::AsyncWriteAtExt;
use iggy_binary_protocol::consensus::iobuf::Owned;
use iggy_binary_protocol::consensus::message::Message;
use iggy_binary_protocol::consensus::{Command2, PrepareHeader};
use iobuf::Owned;
use std::cell::{Cell, Ref, RefCell};
use std::fmt;
use std::io;
Expand Down
1 change: 0 additions & 1 deletion core/metadata/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ tracing = { workspace = true }
bytemuck = { workspace = true }
bytes = { workspace = true }
compio = { workspace = true }
iobuf = { workspace = true }
tempfile = { workspace = true }

[lints.clippy]
Expand Down
2 changes: 1 addition & 1 deletion core/metadata/src/impls/recovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ where
#[allow(clippy::cast_possible_truncation)]
mod tests {
use super::*;
use iggy_binary_protocol::consensus::iobuf::Owned;
use iggy_binary_protocol::consensus::{Command2, Operation};
use iobuf::Owned;
use journal::Journal;
use tempfile::tempdir;

Expand Down
1 change: 0 additions & 1 deletion core/partitions/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ compio = { workspace = true }
consensus = { workspace = true }
iggy_binary_protocol = { workspace = true }
iggy_common = { workspace = true }
iobuf = { workspace = true }
journal = { workspace = true }
message_bus = { workspace = true }
ringbuffer = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion core/partitions/src/iggy_partitions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ use consensus::{
pipeline_prepare_common, replicate_preflight, replicate_to_next_in_chain, request_preflight,
send_prepare_ok as send_prepare_ok_common,
};
use iggy_binary_protocol::consensus::iobuf::Frozen;
use iggy_binary_protocol::{
Command2, ConsensusHeader, GenericHeader, Message, Operation, PrepareHeader, PrepareOkHeader,
RequestHeader,
Expand All @@ -43,7 +44,6 @@ use iggy_common::{
send_messages2::{convert_request_message, decode_prepare_slice},
sharding::{IggyNamespace, LocalIdx, ShardId},
};
use iobuf::Frozen;
use journal::{Journal, JournalHandle};
use message_bus::MessageBus;
use std::cell::UnsafeCell;
Expand Down
2 changes: 1 addition & 1 deletion core/partitions/src/journal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
// specific language governing permissions and limitations
// under the License.

use iggy_binary_protocol::consensus::iobuf::{Frozen, Owned};
use iggy_binary_protocol::{Operation, PrepareHeader};
use iggy_common::send_messages2::{COMMAND_HEADER_SIZE, SendMessages2Ref, decode_prepare_slice};
use iobuf::{Frozen, Owned};
use journal::{Journal, Storage};
use std::io;
use std::{
Expand Down
2 changes: 1 addition & 1 deletion core/partitions/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ mod types;

use iggy_binary_protocol::{Message, PrepareHeader};
use iggy_common::IggyError;
pub use iggy_common::{IggyMessage2, IggyMessage2Header, IggyMessages2};
pub use iggy_common::send_messages2::{IggyMessage2, IggyMessage2Header, IggyMessages2};
pub use iggy_partition::IggyPartition;
pub use iggy_partitions::IggyPartitions;
pub use types::{
Expand Down
2 changes: 1 addition & 1 deletion core/partitions/src/messages_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ use compio::{
fs::{File, OpenOptions},
io::AsyncWriteAtExt,
};
use iggy_binary_protocol::consensus::iobuf::Frozen;
use iggy_common::{IggyByteSize, IggyError};
use iobuf::Frozen;
use std::{
rc::Rc,
sync::atomic::{AtomicU64, Ordering},
Expand Down
Loading
Loading