[Tarantool-patches] [PATCH v2 0/3] fio: close unused descriptors automatically

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Tue Mar 3 02:29:50 MSK 2020


The patchset introduces a fiber worker singleton object and uses
it for garbage collection of fio and SWIM objects. This is a
workaround for inability to yield in ffi.gc hook, which is used by
fio and SWIM.

SWIM had GC before, but it was creating a new fiber for each GC.
Fio didn't have GC.

Branch: http://github.com/tarantool/tarantool/tree/gerold103/gh-4727-fio-gc
Issue: https://github.com/tarantool/tarantool/issues/4727

@ChangeLog
- fio descriptors are closed on garbage collection (gh-4727).

Changes in V2:
- Added a special single fiber for garbage collection of objects,
  which yield in their destructors.

Vladislav Shpilevoy (3):
  fiber: introduce schedule_task() internal function
  fio: close unused descriptors automatically
  swim: use fiber._internal.schedule_task() for GC

 src/lua/fiber.c                  |  15 +++++
 src/lua/fiber.lua                |  60 ++++++++++++++++++
 src/lua/fio.lua                  |  34 ++++++++--
 src/lua/swim.lua                 |  11 ++--
 test/app/fiber.result            |  72 +++++++++++++++++++++
 test/app/fiber.test.lua          |  41 ++++++++++++
 test/app/gh-4727-fio-gc.result   | 104 +++++++++++++++++++++++++++++++
 test/app/gh-4727-fio-gc.test.lua |  60 ++++++++++++++++++
 8 files changed, 385 insertions(+), 12 deletions(-)
 create mode 100644 test/app/gh-4727-fio-gc.result
 create mode 100644 test/app/gh-4727-fio-gc.test.lua

-- 
2.21.1 (Apple Git-122.3)



More information about the Tarantool-patches mailing list