@@ -380,16 +380,16 @@ Run an action with access to a session opened from a session directory.
380
380
If the session directory is empty, a new session is created.
381
381
Otherwise, the session directory is opened as an existing session.
382
382
383
- The worst-case disk I\/O complexity of this operation depends on the merge policy of the table:
383
+ If there are no open tables or cursors when the session terminates, then this disk I\/O complexity of this operation is \(O(1)\).
384
+ Otherwise, 'closeTable' is called for each open table and 'closeCursor' is called for each open cursor.
385
+ Consequently, the worst-case disk I\/O complexity of this operation depends on the merge policy of the open tables in the session.
386
+ The following assumes all tables in the session have the same merge policy:
384
387
385
388
['LazyLevelling']:
386
- \(O(o \: T \log_T \frac{n}{B})\).
389
+ \(O(o \: T \log_T \frac{n}{B})\).
387
390
388
391
The variable \(o\) refers to the number of open tables and cursors in the session.
389
392
390
- If the session has any open tables, then 'closeTable' is called for each open table and 'closeCursor' is called for each open cursor.
391
- Otherwise, the disk I\/O cost operation is \(O(1)\).
392
-
393
393
This function is exception-safe for both synchronous and asynchronous exceptions.
394
394
395
395
It is recommended to use this function instead of 'openSession' and 'closeSession'.
@@ -496,16 +496,16 @@ openSessionIO tracer sessionDir = do
496
496
{- |
497
497
Close a session.
498
498
499
- The worst-case disk I\/O complexity of this operation depends on the merge policy of the table:
499
+ If there are no open tables or cursors in the session, then this disk I\/O complexity of this operation is \(O(1)\).
500
+ Otherwise, 'closeTable' is called for each open table and 'closeCursor' is called for each open cursor.
501
+ Consequently, the worst-case disk I\/O complexity of this operation depends on the merge policy of the tables in the session.
502
+ The following assumes all tables in the session have the same merge policy:
500
503
501
504
['LazyLevelling']:
502
- \(O(o \: T \log_T \frac{n}{B})\).
505
+ \(O(o \: T \log_T \frac{n}{B})\).
503
506
504
507
The variable \(o\) refers to the number of open tables and cursors in the session.
505
508
506
- If the session has any open tables, then 'closeTable' is called for each open table and 'closeCursor' is called for each open cursor.
507
- Otherwise, this operation takes constant time.
508
-
509
509
Closing is idempotent, i.e., closing a closed session does nothing.
510
510
All other operations on a closed session will throw an exception.
511
511
-}
@@ -531,7 +531,10 @@ closeSession (Session session) =
531
531
{- |
532
532
Run an action with access to an empty table.
533
533
534
- The worst-case disk I\/O complexity of this operation is \(O(1)\).
534
+ The worst-case disk I\/O complexity of this operation depends on the merge policy of the table:
535
+
536
+ ['LazyLevelling']:
537
+ \(O(T \log_T \frac{n}{B})\).
535
538
536
539
This function is exception-safe for both synchronous and asynchronous exceptions.
537
540
@@ -621,7 +624,10 @@ newTableWith tableConfig (Session session) =
621
624
{- |
622
625
Close a table.
623
626
624
- The worst-case disk I\/O complexity of this operation is \(O(T \log_T \frac{n}{B})\).
627
+ The worst-case disk I\/O complexity of this operation depends on the merge policy of the table:
628
+
629
+ ['LazyLevelling']:
630
+ \(O(T \log_T \frac{n}{B})\).
625
631
626
632
Closing is idempotent, i.e., closing a closed table does nothing.
627
633
All other operations on a closed table will throw an exception.
0 commit comments