MCPcopy Create free account
hub / github.com/wal-e/wal-e / write

Method write

wal_e/pipebuf.py:249–260  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

247 return flushed
248
249 def write(self, data):
250 self._bd.add(data)
251
252 flushed = True
253 while flushed and self._bd.byteSz > PIPE_BUF_BYTES:
254 # Flush down to a small amount of buffered bytes as to
255 # avoid memory-copy intensive defragmentations.
256 #
257 # The tradeoff being made here is the price of a syscall
258 # (where larger buffers are better) vs. the price of
259 # copying some memory.
260 flushed = self._partial_flush(65535)
261
262 def flush(self):
263 while self._bd.byteSz > 0:

Callers 15

copyfileobjFunction · 0.80
_partial_flushMethod · 0.80
acquireMethod · 0.80
write_and_return_errorFunction · 0.80
write_and_return_errorFunction · 0.80
test_no_errorFunction · 0.80
test_clear_on_errorFunction · 0.80
create_filesFunction · 0.80
upload_downloadFunction · 0.80
produceFunction · 0.80

Calls 2

_partial_flushMethod · 0.95
addMethod · 0.80

Tested by 11

test_no_errorFunction · 0.64
test_clear_on_errorFunction · 0.64
create_filesFunction · 0.64
upload_downloadFunction · 0.64
test_creation_upper_dirFunction · 0.64
create_bogus_payloadFunction · 0.64
test_wal_push_fetchFunction · 0.64
test_atomic_downloadFunction · 0.64