Multiple QueryConditions on a single reader

3 posts / 0 new
Last post
njc
Offline
Last seen: 6 years 2 months ago
Joined: 08/09/2012
Posts: 17
Multiple QueryConditions on a single reader

I'm trying to understand the restrictions on creating multiple QueryConditions on a single reader. The docs say: "Two query conditions that have the same query_expression will require unique query condition content filters if their query_paramters differ. Query conditions that differ only in their state masks will share the same query condition content filter."

I'm making QueryConditions that use the same query_expression, but have different query_parameters. How do I create unique "query condition content filters"? I have a data reader shared by multiple threads. Each thread is interested in a separate subset of the data and I'm using QueryConditions to partition the data. When a thread wants to read, it'll create a query condition using the same query expression, but different query parameter. I'm finding I can only create a handful (maybe ~5) QueryConditions before creation of QueryConditions starts failing.

What is the best way to go about this?


Thanks!

Offline
Last seen: 6 years 7 months ago
Joined: 06/24/2013
Posts: 8

You are encountering the reader reasource limit DDS_DataReaderResourceLimitsQosPolicy::max_query_condition_filters, which controls the allocation limits for Query Condition filters. The default value is 4, so failing at 5 is expected. You can set this limit as high as 32.

Setting this limit higher should help your initial problem.

njc
Offline
Last seen: 6 years 2 months ago
Joined: 08/09/2012
Posts: 17

That did it. Thanks!