From 5483a75fd2eaa86a7cda7c7164960e4337057db7 Mon Sep 17 00:00:00 2001 From: Jeromy Date: Mon, 27 Jun 2016 22:31:30 -0700 Subject: [PATCH] fix t0084 License: MIT Signed-off-by: Jeromy --- repo/fsrepo/defaultds.go | 10 +--------- test/sharness/t0084-repo-read-rehash.sh | 4 ++-- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/repo/fsrepo/defaultds.go b/repo/fsrepo/defaultds.go index a352cb0c3f5..f62d0ccd8eb 100644 --- a/repo/fsrepo/defaultds.go +++ b/repo/fsrepo/defaultds.go @@ -31,16 +31,8 @@ func openDefaultDatastore(r *FSRepo) (repo.Datastore, error) { return nil, fmt.Errorf("unable to open leveldb datastore: %v", err) } - // 4TB of 256kB objects ~=17M objects, splitting that 256-way - // leads to ~66k objects per dir, splitting 256*256-way leads to - // only 256. - // - // The keys seen by the block store have predictable prefixes, - // including "/" from datastore.Key and 2 bytes from multihash. To - // reach a uniform 256-way split, we need approximately 4 bytes of - // prefix. syncfs := !r.config.Datastore.NoSync - blocksDS, err := flatfs.New(path.Join(r.path, flatfsDirectory), 4, syncfs) + blocksDS, err := flatfs.New(path.Join(r.path, flatfsDirectory), 7, syncfs) if err != nil { return nil, fmt.Errorf("unable to open flatfs datastore: %v", err) } diff --git a/test/sharness/t0084-repo-read-rehash.sh b/test/sharness/t0084-repo-read-rehash.sh index f5bb5cb88e7..40e822e58ea 100755 --- a/test/sharness/t0084-repo-read-rehash.sh +++ b/test/sharness/t0084-repo-read-rehash.sh @@ -16,8 +16,8 @@ test_init_ipfs H_BLOCK1=$(echo "Block 1" | ipfs add -q) H_BLOCK2=$(echo "Block 2" | ipfs add -q) -BS_BLOCK1="1220f18e/1220f18e07ebc69997909358f28b9d2c327eb032b0afab6bbc7fd7f399a7b7590be4.data" -BS_BLOCK2="1220dc58/1220dc582e51f1f98b1f2d1c1baaa9f7b11602239ed42fbdf8f52d67e63cc03df12a.data" +BS_BLOCK1="CIQPDD/CIQPDDQH5PDJTF4QSNMPFC45FQZH5MBSWCX2W254P7L7HGNHW5MQXZA.data" +BS_BLOCK2="CIQNYW/CIQNYWBOKHY7TCY7FUOBXKVJ66YRMARDT3KC7PPY6UWWPZR4YA67CKQ.data" test_expect_success 'blocks are swapped' '