zenoh icon indicating copy to clipboard operation
zenoh copied to clipboard

Implement proper AUTO query consolidation

Open OlivierHecart opened this issue 2 years ago • 0 comments

The reason for AUTO query consolidation: The default ConsolidationMode is Latest. But when querying a time series storage with a time range query parameter, the user typically wants multiple samples per key and not only the latest. The AUTO ConsolidationMode avoids forcing users to explicitly change the default ConsolidationMode in such case.

Current implementation: When set to AUTO, the querier Zenoh "client" API parses the query parameters. If some parameters (typically _time) imply using non default query consolidation, the ConsolidationMode is changed before the query is sent on the network. This implies parsing the query parameters in the querier Zenoh "client" API which may be problematic.

Expected implementation: When set, the AUTO ConsolidationMode should be propagated on the network with the query. In such case, the consolidation should apply or not depending what the queryable defines. The queryable can define if consolidation should play or not through a new function in the ReplyBuilder. The selected consolidation is propagated back with each reply. Replies marked as "consolidate" (default) will eventually be discarded if not the latest for their key, replies marked as "not-consolidate" will never be discarded.

OlivierHecart avatar Sep 20 '22 08:09 OlivierHecart