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); }