[tarantool-patches] Re: [PATCH 5/5] swim: expose Lua triggers on member update

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Sun Jun 9 19:41:32 MSK 2019



On 09/06/2019 08:15, Konstantin Osipov wrote:
> * Vladislav Shpilevoy <v.shpilevoy at tarantool.org> [19/06/08 22:52]:
>> This is exactly what I was trying to avoid with all these
>> mask metamethods. I want to be able in future to add old values
>> of updated member attributes, if it will be necessary. It will
>> be easy without breaking the old code, if from now we will return
>> just an abstract 'events' object with some metamethods.
>>
>> Also probably in future we will not return the events as a mask.
>> So I don't want to expose swim_ev_mask to Lua API.
>>
>> I've fixed the documentation with 'events' -> 'event' rename.
>> Just treat the object as a complex event from multiple parts.
> 
> OK, but what if I want to test a combination of events? With
> masks, I could just pass a bit.bor() mask to the caller, without I
> have to invoke :is..() multiple times.

Unfortunately, here it is a price of not exposing
any internal details of 'event' object. You need to
use multiple 'is_...()' to check for multiple events.

> 
> Anyway, LGTM after rename.
> 

Pushed to the master.




More information about the Tarantool-patches mailing list