Hello :wave: Is there any way to know / get notifi...
# troubleshooting
j
Hello 👋 Is there any way to know / get notified (e.g. kafka message) when a message is done being ingested and available for query ?
m
There isn't at message level at the moment. When segment is committed, the Kafka offset is stored in segment ZK metadata.
May I ask, how you are planning to use that information?
j
I see, thanks for the answer @Mayank The idea, is that Pinot consumes some messages which will affect query results (pretty logical ^^) - but some other components relies on theses results and pre-computes other results outside Pinot (typically a Node JS micro service) Therefore the need is to update the pre-materialized view whenever Pinot results will change, i.e. whenever a new message is ingested We're considering listening to the original message (the one consumed by Pinot) as a trigger for recomputation - but then we'd have a race condition between this consumer and Pinot
Ideally this pre-materialized view wouldn't exist and be purely computed by Pinot, but that is unfortunately not the case
But even then, that would be implemented as sub queries, which are not currently supported - so not sure that'd solve the problem
Sorry for the wall of text 😶
m
May be create a column that has some counter/offset that could be used for this synchronization?
j
Periodically check that the counter hasn't moved, if so, recompute using latest data ?
m
I was thinking more like get the counter value that you want to synchronize on (perhaps from the apps side), and the add filter on pinot query
where counter <= x)
?
j
How would this ''get the counter'' be triggered ? Periodically ? Using the same message Pinot will / has (hopefully) already ingested ?
m
It is a high-water-mark of sorts that your other systems need to maintain that want to synchronize with Pinot (sorry if I am making incorrect assumptions)
j
So the other system would periodically check if this high water mark is greater than it's latest computation - if so, fetch updated results ? (I've omitted quite a few details, no worries 🙂)
Maybe some useful information: New messages won't affect all pre-computations, meaning the recomputations must be partial (e.g. per userId)