You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Cribl API returns a totalEventCount field indicating how many events should be in the result set. The current implementation tracks this value (line 319-320, 386-387 in bin/goatsearch.py) and separately counts yielded events via self.offset (line 416), but there's no verification that these values match upon completion.
If the counts diverge, it could indicate:
Events were missed during pagination
Duplicate events were yielded
The API returned inconsistent data
Current Behavior
# Line 319-320: Tracks total from status endpointif'totalEventCount'injob_statusandjob_status['totalEventCount'] >self.total_event_count:
total_event_count=job_status['totalEventCount']
# Line 416: Increments for each yielded eventself.offset=self.offset+1
No comparison is made between total_event_count and offset at completion.
Problem
The Cribl API returns a
totalEventCountfield indicating how many events should be in the result set. The current implementation tracks this value (line 319-320, 386-387 inbin/goatsearch.py) and separately counts yielded events viaself.offset(line 416), but there's no verification that these values match upon completion.If the counts diverge, it could indicate:
Current Behavior
No comparison is made between
total_event_countandoffsetat completion.Proposed Solution
Add parity check at job completion:
Add test cases (depends on Add end-to-end test infrastructure for CriblSearch #26):
totalEventCountfor normal completionAcceptance Criteria
Dependencies
Related Code
bin/goatsearch.pylines 319-320, 386-387, 416