Skip to content

Commit 6ccc33c

Browse files
authored
Merge pull request #3713 from atlanhq/plt-2751-idx-limit
PLT-2751 : Set config to add enable the API limitting on demand
2 parents 8584f0f + d174ad0 commit 6ccc33c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

intg/src/main/java/org/apache/atlas/AtlasConfiguration.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ public enum AtlasConfiguration {
114114

115115
INDEXSEARCH_ASYNC_SEARCH_KEEP_ALIVE_TIME_IN_SECONDS("atlas.indexsearch.async.search.keep.alive.time.in.seconds", 300),
116116
ATLAS_INDEXSEARCH_QUERY_SIZE_MAX_LIMIT("atlas.indexsearch.query.size.max.limit", 100000),
117-
ATLAS_INDEXSEARCH_LIMIT_UTM_TAGS("atlas.indexsearch.limit.ignore.utm.tags", "project_sdk_python"),
117+
ATLAS_INDEXSEARCH_LIMIT_UTM_TAGS("atlas.indexsearch.limit.ignore.utm.tags", ""),
118+
ATLAS_INDEXSEARCH_ENABLE_API_LIMIT("atlas.indexsearch.enable.api.limit", false),
118119

119120
ATLAS_MAINTENANCE_MODE("atlas.maintenance.mode", false),
120121

webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ public AtlasSearchResult indexSearch(@Context HttpServletRequest servletRequest,
401401
perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "DiscoveryREST.indexSearch(" + parameters + ")");
402402
}
403403

404-
if (parameters.getQuerySize() > AtlasConfiguration.ATLAS_INDEXSEARCH_QUERY_SIZE_MAX_LIMIT.getLong()) {
404+
if (AtlasConfiguration.ATLAS_INDEXSEARCH_ENABLE_API_LIMIT.getBoolean() && parameters.getQuerySize() > AtlasConfiguration.ATLAS_INDEXSEARCH_QUERY_SIZE_MAX_LIMIT.getLong()) {
405405
if(CollectionUtils.isEmpty(parameters.getUtmTags())) {
406406
throw new AtlasBaseException(AtlasErrorCode.INVALID_DSL_QUERY_SIZE, String.valueOf(AtlasConfiguration.ATLAS_INDEXSEARCH_QUERY_SIZE_MAX_LIMIT.getLong()));
407407
}

0 commit comments

Comments
 (0)