Find start position in large files via binary search
This commit is contained in:
@@ -12,6 +12,7 @@ pub fn make_test_node(id: u32) -> Node {
|
||||
port: 8800 + id as u16,
|
||||
port_raw: 8800 + id as u16 + 100,
|
||||
data_base_path: format!("../tmpdata/node{:02}", id).into(),
|
||||
cache_base_path: format!("../tmpdata/node{:02}", id).into(),
|
||||
split: id,
|
||||
ksprefix: "ks".into(),
|
||||
backend: "testbackend".into(),
|
||||
|
||||
@@ -138,7 +138,7 @@ impl CacheFileDesc {
|
||||
let hc = self.hash_channel();
|
||||
node_config
|
||||
.node
|
||||
.data_base_path
|
||||
.cache_base_path
|
||||
.join("cache")
|
||||
.join(&hc[0..3])
|
||||
.join(&hc[3..6])
|
||||
|
||||
@@ -78,6 +78,7 @@ pub async fn gen_test_data() -> Result<(), Error> {
|
||||
port_raw: 7780 + i1 as u16 + 100,
|
||||
split: i1,
|
||||
data_base_path: data_base_path.join(format!("node{:02}", i1)),
|
||||
cache_base_path: data_base_path.join(format!("node{:02}", i1)),
|
||||
ksprefix: ksprefix.clone(),
|
||||
backend: "testbackend".into(),
|
||||
bin_grain_kind: 0,
|
||||
|
||||
Reference in New Issue
Block a user