[Tarantool-patches] [PATCH 0/4] RFC: Isolate serializer helpers

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Sun Jul 4 16:09:07 MSK 2021


Hi! Thanks for the patchset!

On 23.06.2021 21:12, Alexander Turenko via Tarantool-patches wrote:
> Moved the serializer helpers into its own compilation unit, add some
> comments and a basic test: everything is just to simplify diving into
> this code.
> 
> Guys, please, look, whether it seems useful enough to include into
> tarantool's mainline? Should we name it serializer.[ch] or
> somehow like serializer_helpers.[ch]?
> 
> Part of https://github.com/tarantool/tarantool/issues/3228

Are you sure you need to fix it? It looks like a regular leg shooting.
It might be simple to detect in the case described by Mons, but what if
the recursion is not so easily visible?

	setmetatable({},{
		__serialize = function(a)
			return {{{{a}}}}
		end
	})

You would need to use recursion detection algorithms like the one
we used to ask on interviews. And I am not sure it is worth it if
it can't be done in a simple way.


More information about the Tarantool-patches mailing list