Skip to content

Commit c088e99

Browse files
committed
Adding Batch() note about __exit__() behavior.
1 parent f1e4b46 commit c088e99

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

gcloud/bigtable/happybase/batch.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@
3535
class Batch(object):
3636
"""Batch class for accumulating mutations.
3737
38+
.. note::
39+
40+
When using a batch with ``transaction=False`` as a context manager
41+
(i.e. in a ``with`` statement), mutations will still be sent as
42+
row mutations even if the context manager exits with an error.
43+
This behavior is in place to match the behavior in the HappyBase
44+
HBase / Thrift implementation.
45+
3846
:type table: :class:`Table <gcloud.bigtable.happybase.table.Table>`
3947
:param table: The table where mutations will be applied.
4048

0 commit comments

Comments
 (0)