IntersectMBO / lsm-tree

A Haskell library for on-disk tables based on LSM-Trees
Apache License 2.0
27 stars 7 forks source link

[BUG] Benchmark `lsm-tree-micro-bench` fails with error #440

Open wenkokke opened 2 days ago

wenkokke commented 2 days ago

Describe the bug

lsm-tree-micro-bench: FsError {fsErrorType = FsResourceAlreadyExist, fsErrorPath = /private/var/folders/9b/tq2xht4j42jdnhy6x5nt8r040000gn/T/lookupsInBatchesEnv-188f880fc0b9ac57, fsErrorString = "File exists", fsErrorNo = Just (Errno 17), fsErrorStack = CallStack (from HasCallStack):
  prettyCallStack, called at src/System/FS/API/Types.hs:393:23 in fs-p-0.3.0.1-39dcdd21:System.FS.API.Types
  ioToFsError, called at src/System/FS/IO.hs:113:41 in fs-p-0.3.0.1-39dcdd21:System.FS.IO
  handleError, called at src/System/FS/IO.hs:109:23 in fs-p-0.3.0.1-39dcdd21:System.FS.IO
  rethrowFsError, called at src/System/FS/IO.hs:50:21 in fs-p-0.3.0.1-39dcdd21:System.FS.IO
  hOpen, called at src/System/FS/API.hs:63:5 in fs-p-0.3.0.1-39dcdd21:System.FS.API
  a use of `FS.hOpen', called at src/Database/LSMTree/Internal/WriteBufferBlobs.hs:125:23 in lsm-tree-0.1.0.0-inplace:Database.LSMTree.Internal.WriteBufferBlobs, fsLimitation = False}
Benchmark lsm-tree-micro-bench: ERROR
Error: cabal: Benchmarks failed for bench:lsm-tree-micro-bench from
lsm-tree-0.1.0.0.

To Reproduce Steps to reproduce the behavior:

  1. Check out #426
  2. Run cabal bench lsm-tree-micro-bench

Output If applicable, add log excerpts, screenshots or other files to help explain your problem.

Desktop (please complete the following information):

Additional context The bug is not specific to #426 and already exists on 23939c1e3c77c132af2b4b0941c38030a792b28e.

jorisdral commented 1 day ago

I suspect the following lines are part of the problem: https://github.com/IntersectMBO/lsm-tree/blame/c361efb779c0dc3c8998f7c0106462353fb012f3/bench/micro/Bench/Database/LSMTree/Internal/Lookup.hs#L195-L196