Skip to content

doc: document table configuration #701

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
459 changes: 377 additions & 82 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bench/macro/lsm-tree-bench-wp8.hs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ cmdP = O.subparser $ mconcat

setupOptsP :: O.Parser SetupOpts
setupOptsP = pure SetupOpts
<*> O.option O.auto (O.long "bloom-filter-alloc" <> O.value LSM.defaultBloomFilterAlloc <> O.showDefault <> O.help "Bloom filter allocation method [AllocFixed n | AllocRequestFPR d]")
<*> O.option O.auto (O.long "bloom-filter-alloc" <> O.value (LSM.confBloomFilterAlloc LSM.defaultTableConfig) <> O.showDefault <> O.help "Bloom filter allocation method [AllocFixed n | AllocRequestFPR d]")

runOptsP :: O.Parser RunOpts
runOptsP = pure RunOpts
Expand Down
362 changes: 306 additions & 56 deletions lsm-tree.cabal

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions scripts/generate-readme.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ build-depends:
, pandoc ^>=3.6.4
, text >=2.1
-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}

module Main (main) where

Expand All @@ -22,7 +23,7 @@ import qualified Distribution.Types.PackageDescription as PackageDescription
import Distribution.Utils.ShortText (fromShortText)
import System.IO (hPutStrLn, stderr)
import Text.Pandoc (runIOorExplode)
import Text.Pandoc.Extensions (githubMarkdownExtensions)
import Text.Pandoc.Extensions (getDefaultExtensions)
import Text.Pandoc.Options (ReaderOptions (..), WriterOptions (..),
def)
import Text.Pandoc.Readers (readHaddock)
Expand All @@ -45,6 +46,6 @@ main = do
runIOorExplode $ do
doc1 <- readHaddock def description
let doc2 = headerShift 1 doc1
writeMarkdown def{writerExtensions = githubMarkdownExtensions} doc2
writeMarkdown def{writerExtensions = getDefaultExtensions "gfm"} doc2
let readme = T.unlines [readmeHeaderContent, body]
TIO.writeFile "README.md" readme
42 changes: 30 additions & 12 deletions src/Database/LSMTree.hs
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,12 @@ module Database.LSMTree (
),
defaultTableConfig,
MergePolicy (LazyLevelling),
MergeSchedule (..),
SizeRatio (Four),
WriteBufferAlloc (AllocNumEntries),
BloomFilterAlloc (AllocFixed, AllocRequestFPR),
defaultBloomFilterAlloc,
FencePointerIndexType (OrdinaryIndex, CompactIndex),
DiskCachePolicy (..),
MergeSchedule (..),

-- ** Table Configuration Overrides #table_configuration_overrides#
OverrideDiskCachePolicy (..),
Expand Down Expand Up @@ -156,12 +155,6 @@ module Database.LSMTree (
resolveValidOutput,
resolveAssociativity,

-- * Tracer
Tracer,
LSMTreeTrace (..),
TableTrace (..),
CursorTrace (..),

-- * Errors #errors#
SessionDirDoesNotExistError (..),
SessionDirLockedError (..),
Expand All @@ -178,6 +171,24 @@ module Database.LSMTree (
BlobRefInvalidError (..),
CursorClosedError (..),
InvalidSnapshotNameError (..),

-- * Traces #traces#
Tracer,
LSMTreeTrace (..),
TableTrace (..),
CursorTrace (..),
MergeTrace (..),
CursorId (..),
TableId (..),
AtLevel (..),
LevelNo (..),
NumEntries (..),
RunNumber (..),
MergePolicyForLevel (..),
LevelMergeType (..),
RunParams (..),
RunDataCaching (..),
IndexType (..),
) where

import Control.Concurrent.Class.MonadMVar.Strict (MonadMVar)
Expand All @@ -203,17 +214,24 @@ import qualified Database.LSMTree.Internal.BlobRef as Internal
import Database.LSMTree.Internal.Config
(BloomFilterAlloc (AllocFixed, AllocRequestFPR),
DiskCachePolicy (..), FencePointerIndexType (..),
MergePolicy (..), MergeSchedule (..), SizeRatio (..),
TableConfig (..), WriteBufferAlloc (..),
defaultBloomFilterAlloc, defaultTableConfig,
serialiseKeyMinimalSize)
LevelNo (..), MergePolicy (..), MergeSchedule (..),
SizeRatio (..), TableConfig (..), WriteBufferAlloc (..),
defaultTableConfig, serialiseKeyMinimalSize)
import Database.LSMTree.Internal.Config.Override
(OverrideDiskCachePolicy (..))
import Database.LSMTree.Internal.Entry (NumEntries (..))
import qualified Database.LSMTree.Internal.Entry as Entry
import Database.LSMTree.Internal.Merge (LevelMergeType (..))
import Database.LSMTree.Internal.MergeSchedule (AtLevel (..),
MergePolicyForLevel (..), MergeTrace (..))
import Database.LSMTree.Internal.Paths (SnapshotName,
isValidSnapshotName, toSnapshotName)
import Database.LSMTree.Internal.Range (Range (..))
import Database.LSMTree.Internal.RawBytes (RawBytes (..))
import Database.LSMTree.Internal.RunBuilder (IndexType (..),
RunDataCaching (..), RunParams (..))
import Database.LSMTree.Internal.RunNumber (CursorId (..),
RunNumber (..), TableId (..))
import qualified Database.LSMTree.Internal.Serialise as Internal
import Database.LSMTree.Internal.Serialise.Class (SerialiseKey (..),
SerialiseKeyOrderPreserving, SerialiseValue (..),
Expand Down
Loading