Remove "hint" from the default prefixes list, and add an explicit test for hint removal.

What: This MR takes the BG "hint" prefix out of the default list that we add to every incoming request.

Why: While it didn't cause any problems to add it to every incoming Query and then remove it, it does cause at least a testing issue when the object in question is an UpdateRequest and not a Query, and thus doesn't go through the query rewrite logic. (Basically, the prefix was added to every UpdateRequest but then not actually taken away. This wouldn't result in an actual bug since the extra prefix is ignored, but it makes tests fail due to the extra prefix.) Also, it does feel a bit weird to add and remove this deprecated header to/from every single incoming request.

This prefix's inclusion in the default list provided an implicit test of the BlazegraphHintHandler logic to strip it. We should keep testing that, so why not just make it explicit? To that end, I added a test (with some hint statements too, not just the prefix).

Note that the "prefixes" list in QueryRewriterServiceTest needed no update with this change, since that prefix was always removed by the query rewriter logic anyway.

Bug: T423104

@trueg @gmodena

Edited by Lerickson

Merge request reports

Loading