[Tarantool-patches] [PATCH 2/2] feedback: collect db engines and index features

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Thu Jun 18 01:53:37 MSK 2020


Hi! Thanks for the fixes!

> I’ve worked on your comments and fixed lapses. See comments below.
> 
> Besides that, are you ok with pushing this (Lua) patch forward?

I am ok.

>>> +local function fill_in_features_impl(features)
>>> +    fill_in_space_stats(features)
>>> +end
>>> +
>>> +local cached_schema_version = 0
>>> +local cached_feedback_features = {}
>>
>> 4. I would better move the cache handling into fill_in_space_stats().
>> Because when you will add more features, not related to the schema,
>> they won't relate to schema version.
>>
>> fill_in_features() should not use any caches. Does not depend on schema.
>> fill_in_space_stats() can use the cache. Because fetches info from the
>> schema.
>>
>> I mean, it works now, but we would need to rewrite that mostly, when
>> more features will be collected.
> 
> Agree. Extracted out caching into fill_in_space_stats(), but kept it in fill_in_features(), since space_stats is semantically features.

This is a little bit better but basically is still the same. Just add
a few dummy functions like

	fill_in_swim()
	fill_in_box_update()
	fill_in_vinyl_stat()
	fill_in_netbox()

which would need to add several new fields to the feedback.features table,
and see how hard it is to fit it into this code without rewriting it
completely. Ideally addition of such new functions should not change a
single line of the existing code.

Perhaps you may need to store schema features in feedback.features.schema,
not in feedback.features. So the schema becomes isolated from the other
features. And store the others like feedback.features.swim,
feedback.features.box_update, feedback.features.vinyl, etc. Not in a huge
flat table.


More information about the Tarantool-patches mailing list