hubcio commented on code in PR #4092:
URL: https://github.com/apache/iggy/pull/4092#discussion_r3983316998


##########
core/bench/src/utils/mod.rs:
##########
@@ -321,14 +330,15 @@ fn add_infrastructure_arguments(parts: &mut Vec<String>, 
args: &IggyBenchArgs) {
         parts.push(format!("--max-topic-size \'{max_topic_size}\'"));

Review Comment:
   fixed; consumer-only replay no longer adds --partitions.



##########
core/bench/src/utils/mod.rs:
##########
@@ -321,14 +330,15 @@ fn add_infrastructure_arguments(parts: &mut Vec<String>, 
args: &IggyBenchArgs) {
         parts.push(format!("--max-topic-size \'{max_topic_size}\'"));
     }

Review Comment:
   fixed the group-mode defaults; replay keeps the same geometry.



##########
core/server_common/src/segment_storage/mod.rs:
##########
@@ -39,6 +42,49 @@ pub struct SegmentStorage {
 }
 
 impl SegmentStorage {
+    /// The WAL owns message writes; this storage exposes only their committed 
prefix.
+    pub async fn with_read_only_messages(

Review Comment:
   the constructors have different contracts; their call sites are correct.



##########
core/server_common/src/fs_utils.rs:
##########
@@ -44,6 +48,58 @@ impl DirEntry {
     }
 }
 
+/// Reserve segment space without changing its contents or logical length.
+/// Unsupported or failed reservations fall back to buffered allocation.
+#[cfg(target_os = "linux")]
+pub fn preallocate_file(file: &fs::File, file_path: &Path, len: u64) {
+    let Ok(len) = i64::try_from(len) else {
+        warn!(
+            target: "iggy.partitions.storage",
+            file = %file_path.display(),
+            preallocate_len = len,
+            "file preallocation size is unsupported, using buffered allocation"
+        );
+        return;
+    };
+
+    // Runs INLINE on the shard thread, deliberately. `server_common::executor`

Review Comment:
   trimmed the comment to why the io has to run inline.



##########
core/bench/src/args/defaults.rs:
##########
@@ -35,15 +35,15 @@ pub const DEFAULT_MESSAGE_BATCHES: NonZeroU32 = u32!(1000);
 pub const DEFAULT_MESSAGE_SIZE: NonZeroU32 = u32!(1000);
 pub const DEFAULT_TOTAL_MESSAGES_SIZE: IggyByteSize = 
IggyByteSize::new(8_000_000);
 
-pub const DEFAULT_PINNED_NUMBER_OF_STREAMS: NonZeroU32 = u32!(8);
+pub const DEFAULT_PINNED_NUMBER_OF_STREAMS: NonZeroU32 = u32!(6);

Review Comment:
   the e2e mode shares pinned stream assignment, so the default is shared.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to