Skip to content

Conversation

@tisonkun
Copy link
Contributor

No description provided.

Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
.unwrap()
FoyerEngine::try_new(
dir.path(),
ByteSize::default(),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default to zero.

env_name: "PERCAS_CONFIG_STORAGE_DISK_CAPACITY",
ent_path: "storage.disk_capacity",
ent_type: "integer",
ent_type: "string",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ByteSize can accept "1234" as bytes. So this change is not breaking.

Signed-off-by: tison <wander4096@gmail.com>
}

let mut db = FsDeviceBuilder::new(data_dir).with_capacity(disk_capacity as usize);
let mut db = FsDeviceBuilder::new(data_dir).with_capacity(disk_capacity.0 as usize);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MrCroxx Entrypoint that foyer can use bytesize.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But foyer may not want to add an external dep in the public API. Let me think of the boundary ...

BlockEngineBuilder::new(dev)
.with_recover_concurrency(parallelism)
.with_block_size(DEFAULT_BLOCK_SIZE)
.with_block_size(DEFAULT_BLOCK_SIZE.0 as usize)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MrCroxx Entrypoint that foyer can use bytesize.

Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
@tisonkun tisonkun force-pushed the bytesize-everywhere branch from f8dcc36 to 111b32a Compare October 12, 2025 01:49
@tisonkun tisonkun enabled auto-merge (squash) October 12, 2025 01:49
@tisonkun tisonkun merged commit c1a125a into main Oct 12, 2025
4 checks passed
@tisonkun tisonkun deleted the bytesize-everywhere branch October 12, 2025 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants