[Tarantool-patches] [PATCH 3/5] qsync: txn_commit_async -- drop redundant variable

Cyrill Gorcunov gorcunov at gmail.com
Sat Jul 11 00:10:20 MSK 2020


On Fri, Jul 10, 2020 at 10:35:50PM +0200, Vladislav Shpilevoy wrote:
> Опять же. Патч технически корректен, но так же и бесполезен.
> Его полезность сравнима с исправлением опечатки в каком-нибудь
> не особо нужном комменте. Сори, если токсично звучит.
> 
> Но не вижу в этом патче нужды.

We've to allocate a variable which we simply don't need. Look,
the former code reads the flag, puts it into variable then
immediately read it and that's all :/ I think we should not
spread @is_sync but read the flag as much as possible for
better grep'ability.

Of course there are places where read-once variable is preferred
but this is not our case.


More information about the Tarantool-patches mailing list