Work around Ruby 2.7 garbage collection bugs in Gitaly client
What does this MR do and why?
As we saw with
!81948 (merged), calling
Enumerable#flat_map
may lead to a GC bug because the concatenated
array can be GC'd prematurely. By calling #to_a
explicitly, we
insert it into the Ruby stack so that GC can recognize it and keep it
around.
Relates to #386556 (closed)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Stan Hu