@@ -8,12 +8,11 @@ module Test.Database.LSMTree.Internal.RunReader (
88import Control.RefCount
99import Data.Coerce (coerce )
1010import qualified Data.Map as Map
11- import Database.LSMTree.Extras.Generators
12- (BiasedKeyForIndexCompact (.. ))
11+ import Database.LSMTree.Extras.Generators (BiasedKey (.. ))
1312import Database.LSMTree.Extras.RunData
1413import Database.LSMTree.Internal.BlobRef
1514import Database.LSMTree.Internal.Entry (Entry )
16- import qualified Database.LSMTree.Internal.Index as Index (IndexType (Compact ))
15+ import qualified Database.LSMTree.Internal.Index as Index (IndexType (Ordinary ))
1716import Database.LSMTree.Internal.Run (Run )
1817import qualified Database.LSMTree.Internal.RunAcc as RunAcc
1918import qualified Database.LSMTree.Internal.RunBuilder as RunBuilder
@@ -71,7 +70,7 @@ runParams =
7170 RunBuilder. RunParams {
7271 runParamCaching = RunBuilder. CacheRunData ,
7372 runParamAlloc = RunAcc. RunAllocFixed 10 ,
74- runParamIndex = Index. Compact
73+ runParamIndex = Index. Ordinary
7574 }
7675
7776-- | Creating a run from a write buffer and reading from the run yields the
@@ -86,8 +85,8 @@ runParams =
8685prop_readAtOffset ::
8786 FS. HasFS IO h
8887 -> FS. HasBlockIO IO h
89- -> RunData BiasedKeyForIndexCompact SerialisedValue SerialisedBlob
90- -> Maybe BiasedKeyForIndexCompact
88+ -> RunData BiasedKey SerialisedValue SerialisedBlob
89+ -> Maybe BiasedKey
9190 -> IO Property
9291prop_readAtOffset fs hbio rd offsetKey =
9392 withRunAt fs hbio runParams (simplePath 42 ) rd' $ \ run -> do
@@ -109,15 +108,15 @@ prop_readAtOffset fs hbio rd offsetKey =
109108prop_readAtOffsetExisting ::
110109 FS. HasFS IO h
111110 -> FS. HasBlockIO IO h
112- -> RunData BiasedKeyForIndexCompact SerialisedValue SerialisedBlob
111+ -> RunData BiasedKey SerialisedValue SerialisedBlob
113112 -> NonNegative Int
114113 -> IO Property
115114prop_readAtOffsetExisting fs hbio rd (NonNegative index)
116115 | null kops = pure discard
117116 | otherwise =
118117 prop_readAtOffset fs hbio rd (Just (keys !! (index `mod` length keys)))
119118 where
120- keys :: [BiasedKeyForIndexCompact ]
119+ keys :: [BiasedKey ]
121120 keys = coerce (fst <$> kops)
122121 kops = Map. toList (unRunData rd)
123122
@@ -130,8 +129,8 @@ prop_readAtOffsetExisting fs hbio rd (NonNegative index)
130129prop_readAtOffsetIdempotence ::
131130 FS. HasFS IO h
132131 -> FS. HasBlockIO IO h
133- -> RunData BiasedKeyForIndexCompact SerialisedValue SerialisedBlob
134- -> Maybe BiasedKeyForIndexCompact
132+ -> RunData BiasedKey SerialisedValue SerialisedBlob
133+ -> Maybe BiasedKey
135134 -> IO Property
136135prop_readAtOffsetIdempotence fs hbio rd offsetKey =
137136 withRunAt fs hbio runParams (simplePath 42 ) rd' $ \ run -> do
@@ -155,7 +154,7 @@ prop_readAtOffsetIdempotence fs hbio rd offsetKey =
155154prop_readAtOffsetReadHead ::
156155 FS. HasFS IO h
157156 -> FS. HasBlockIO IO h
158- -> RunData BiasedKeyForIndexCompact SerialisedValue SerialisedBlob
157+ -> RunData BiasedKey SerialisedValue SerialisedBlob
159158 -> IO Property
160159prop_readAtOffsetReadHead fs hbio rd =
161160 withRunAt fs hbio runParams (simplePath 42 ) rd' $ \ run -> do
0 commit comments