From 1a90670af55495458bd23156b1f1456b524f8b8d Mon Sep 17 00:00:00 2001 From: Jonathan Creasy Date: Thu, 6 Oct 2016 20:04:58 -0500 Subject: [PATCH] Added an additional spot where Annotation support may need to be disabled --- src/tsd/QueryRpc.java | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/tsd/QueryRpc.java b/src/tsd/QueryRpc.java index 2f6d92be24..f4a854466e 100644 --- a/src/tsd/QueryRpc.java +++ b/src/tsd/QueryRpc.java @@ -519,22 +519,27 @@ public static TSQuery parseQuery(final TSDB tsdb, final HttpQuery query) { public static TSQuery parseQuery(final TSDB tsdb, final HttpQuery query, final List expressions) { final TSQuery data_query = new TSQuery(); - + final disableAnnotations = tsdb.getConfig().getString("tsd.core.enable_annotations").equals("false"); data_query.setStart(query.getRequiredQueryStringParam("start")); data_query.setEnd(query.getQueryStringParam("end")); if (query.hasQueryStringParam("padding")) { data_query.setPadding(true); } - - if (query.hasQueryStringParam("no_annotations")) { + + if (disableAnnotations) { data_query.setNoAnnotations(true); + data_query.setGlobalAnnotations(false); + } else { + if (query.hasQueryStringParam("no_annotations") || disableAnnotations) { + data_query.setNoAnnotations(true); + } + + if (query.hasQueryStringParam("global_annotations") || disableAnnotations) { + data_query.setGlobalAnnotations(true); + } } - - if (query.hasQueryStringParam("global_annotations")) { - data_query.setGlobalAnnotations(true); - } - + if (query.hasQueryStringParam("show_tsuids")) { data_query.setShowTSUIDs(true); }