himanshug commented on issue #8713: Improper result-level cache ETag handling 
for union datasources
URL: 
https://github.com/apache/incubator-druid/issues/8713#issuecomment-545676670
 
 
   Thanks for the detailed information.
   
   I think `UnionDataSource` should handle this special case which would solve 
the problem for both `ResultLevelCache` and for users with their own result 
level cache outside of Druid that are using same protocol.
   
   `UnionDataSource` should have different `ResponseContext` objects for 
different queries and merge them into a single [maybe nested] `ResponseContext` 
object. The merge process creates the `top level Etag = 
serialize-to-string(array of ETag objects from each query)`
   Also, If `UnionDataSource` receives `If-None-Match` key in the incoming 
`ResponseObject` , it should assume that would be a serialized string from 
array of size N (equal to number of DataSources in the query), break it into 
elements and add to one per datasource query `ResponseObject` it creates. If 
`If-None-Match` value is not deserializable into string array of size N then 
fail with `IAE` exception.
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to