Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
None
-
HA
-
2
-
HA 2022-01-05, HA 2022-01-19
-
Needs Assessment
-
Bug Fix
-
Fixes an issue with sync and with /pdb/query/v4/<entity>/<certname> style queries
-
Needs Assessment
Description
Sync is bouncing nodes, and creating unnecessary calls to the currently expensive `has-newer-record-for-certname?`. Because it has the record already, the check is true and it does not enqueue the command. This results in a count of 0 for the nodes entity even though it did all the work of transferring and vetting a command, but just didn't enqueue it.
The discrepancy is between the handling of ttls between produce-streaming-body which gets called by the query endpoint and stream-query-result which gets called by the trapperkeeper endpoint.
produce-streaming-body properly handles the context, and turns it into query-config as expected
query-config (select-keys context [:node-purge-ttl :add-agent-report-filter])
|
In steam-query-result the node-purge-ttl setting needed to properly set the inactive_nodes CTE for the query is in the context. But we strip it out before proceeding to turn the AST into SQL.
(select-keys context [:log-queries :query-id])
|
Attachments
Issue Links
- relates to
-
PDB-5378 Don't traverse all reports when deactivating a node
-
- Resolved
-