Tarantool development patches archive
 help / color / mirror / Atom feed
* [tarantool-patches] [PATCH v5 0/2] force gc on running out of disk space
@ 2018-07-05 18:39 Konstantin Belyavskiy
  2018-07-05 18:39 ` [tarantool-patches] [PATCH v5 1/2] replication: rename thread from tx to tx_prio Konstantin Belyavskiy
  2018-07-05 18:39 ` [tarantool-patches] [PATCH v5 2/2] replication: force gc to clean xdir on ENOSPC err Konstantin Belyavskiy
  0 siblings, 2 replies; 6+ messages in thread
From: Konstantin Belyavskiy @ 2018-07-05 18:39 UTC (permalink / raw)
  To: tarantool-patches

Garbage collector do not delete xlog unless replica do not notify
master with newer vclock. This can lead to running out of disk
space error and this is not right behaviour since it will stop the
master.
Fix it by forcing gc to clean xlogs for replica with highest lag.
Add an error injection and a test.

Changes in V2:
- Promoting error from wal_thread to tx via cpipe.
Changes in V3:
- Delete consumers and only for replicas (but not backup).
Changes in V4:
- Bug fix and small changes according to review.
Changes in V5:
- Compare signatures of the oldest replica and the oldest snapshot
  to keep to prevent deletion if it will not free any disk space.
- Add say_crit on consumer deletion with a little information.

Tichet: https://github.com/tarantool/tarantool/issues/3397
Branch: https://github.com/tarantool/tarantool/compare/kbelyavs/gh-3397-force-del-logs-on-no-disk-space

Konstantin Belyavskiy (2):
  replication: rename thread from tx to tx_prio
  replication: force gc to clean xdir on ENOSPC err

 src/box/box.cc                                     |   1 +
 src/box/gc.c                                       |  62 +++++++++++
 src/box/gc.h                                       |  18 +++
 src/box/relay.cc                                   |   1 +
 src/box/wal.cc                                     |  44 ++++++--
 src/errinj.h                                       |   1 +
 src/fio.c                                          |   7 ++
 test/box/errinj.result                             |   2 +
 test/replication/kick_dead_replica_on_enspc.result | 121 +++++++++++++++++++++
 .../kick_dead_replica_on_enspc.test.lua            |  56 ++++++++++
 test/replication/suite.ini                         |   2 +-
 11 files changed, 306 insertions(+), 9 deletions(-)
 create mode 100644 test/replication/kick_dead_replica_on_enspc.result
 create mode 100644 test/replication/kick_dead_replica_on_enspc.test.lua

-- 
2.14.3 (Apple Git-98)

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-07-10 18:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-05 18:39 [tarantool-patches] [PATCH v5 0/2] force gc on running out of disk space Konstantin Belyavskiy
2018-07-05 18:39 ` [tarantool-patches] [PATCH v5 1/2] replication: rename thread from tx to tx_prio Konstantin Belyavskiy
2018-07-05 18:39 ` [tarantool-patches] [PATCH v5 2/2] replication: force gc to clean xdir on ENOSPC err Konstantin Belyavskiy
2018-07-06 17:00   ` [tarantool-patches] " Konstantin Osipov
2018-07-10 15:10     ` [tarantool-patches] " Konstantin Belyavskiy
2018-07-10 18:37       ` Konstantin Osipov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox