Skip to content

Commit 1d2183d

Browse files
committed
doc: Clarify documentation for union debt and credits.
1 parent b49043f commit 1d2183d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Database/LSMTree/Internal/Unsafe.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,9 +1685,10 @@ ensureSessionsMatch (t :| ts) = do
16851685
-------------------------------------------------------------------------------}
16861686

16871687
{- |
1688-
The amount of union debt is an upper bound on the amount of computation that
1689-
needs to be performed before an incremental union is completed. This includes
1690-
the cost of completing incremental unions that were part of a union's input.
1688+
Union debt represents the amount of computation that must be performed before an incremental union is completed.
1689+
This includes the cost of completing incremental unions that were part of a union's input.
1690+
1691+
__Warning:__ The 'UnionDebt' returned by 'Database.LSMTree.remainingUnionDebt' is an /upper bound/ on the remaining union debt, not the exact union debt.
16911692
-}
16921693
newtype UnionDebt = UnionDebt Int
16931694
deriving newtype (Show, Eq, Ord, Num)
@@ -1709,8 +1710,7 @@ remainingUnionDebt t = do
17091710
pure (UnionDebt c)
17101711

17111712
{- |
1712-
The amount of union credits determines the amount of computation performed to
1713-
incrementally complete a union.
1713+
Union credits are passed to 'Database.LSMTree.supplyUnionCredits' to perform some amount of computation to incrementally complete a union.
17141714
-}
17151715
newtype UnionCredits = UnionCredits Int
17161716
deriving newtype (Show, Eq, Ord, Num)

0 commit comments

Comments
 (0)