feat: add more options on mount#172
Conversation
|
Could you help take a look? @bigbigxu I think I will add some tests to validate this. Do you have some existing tests that I can extend |
| pub fn new(id: u32, curvine_uri: String, ufs_uri: String, mnt_opt: MountOptions) -> Self { | ||
| let consistency_conf = mnt_opt.consistency_config.unwrap_or_default(); | ||
| let strategy = ConsistencyStrategy::from(consistency_conf); | ||
| let block_size = mnt_opt.block_size.unwrap_or_default(); |
There was a problem hiding this comment.
unwrap_or_default should not be used here, option should still be used.
There was a problem hiding this comment.
If so, users should always specify this option when mounting
| } | ||
|
|
||
| async fn get_mount_point(&mut self, ufs_base_uri: &String) -> FsResult<MountPointInfo> { | ||
| pub async fn get_mount_point_with_uri( |
| opts_builder = opts_builder.ttl_action(action); | ||
| } | ||
|
|
||
| opts_builder = opts_builder |
There was a problem hiding this comment.
When parameters such as block_size are None, the configuration in the curvine-cluster.toml file should be used.
There was a problem hiding this comment.
From my perspective, the curvine-cluster.toml file specified at startup may be inconsistent with the master’s configuration, especially if some workers start later than others. According to the central control design, workers should always retrieve their configurations from the master.
Based on the above assumption, block_size should never be None; this is ensured by the master when retrieving the mount point information.
What do you think?
There was a problem hiding this comment.
However, the block size of the mount point can be left unset. If not set, the client configuration of the current node should be used.
There was a problem hiding this comment.
yes. I think the block size should always be set by the master side. If user don't specify this when mounting, master will set this according to the client conf in this master node.
There was a problem hiding this comment.
yes. I think the block size should always be set by the master side. If user don't specify this when mounting, master will set this according to the client conf in this master node.
Is this OK? @bigbigxu
|
BTW, could you add the usage in doc |
Or i open a issue to follow this question |
Yes, this will be done after this PR is ok for all reviewer. |
|
Aha, this PR haven't add test cases (but merged). I will add tests and doc in the later PRs. @bigbigxu |
maybe we can use [WIP] state in pr title to if this item havn't completed 😁 |
No description provided.