ovis icon indicating copy to clipboard operation
ovis copied to clipboard

(v4) store_sos schema indexing should be configurable, with a default

Open baallan opened this issue 5 years ago • 1 comments

The store_sos plugin assumes a set of indices which may not be satisfactory for all use cases. Ideally, the store plugin user should be able to define the indices as they wish, with a default applied if they specify none and a way to specify no indexing also.

For example:

strgp_add name=store_meminfo plugin=store_sos schema=meminfo container=node

should index meminfo according to the default indices (what exactly the default should be is a separate discussion).

strgp_add name=store_meminfo plugin=store_sos schema=meminfo container=node index=NONE

should define meminfo storage without indexing. We make none a reserved name for this plugin. This might be useful when maximizing insert speed for a container that is going to be rolled over and merged to another database where we actually want an index to be created.

strgp_add name=store_switchport plugin=store_sos schema=switchport container=node index=comptime,component_id,timestamp index=devtime,device,timestamp

replaces the default indices with the two given.

Implementation concerns: The ldms util avl allow repetition of keywords, so this is no problem.

Usability concerns: This provides the existing behavior and allows two new ones. The case not covered above is where the user wants to extend the default set of indices rather than replacing it. We could allow this with an alternate keyword addindex for extending the defaults. Personally, I would prefer the default set of indices to be NONE, but any default is fine so long as I can override it with config commands.

baallan avatar Jul 24 '19 18:07 baallan

In ovis_util/util.h av_idx_of and av_value_at provide the primitives needed to handle detection and use of repeated arguments.

baallan avatar Jul 24 '19 18:07 baallan