Skip to content

Commit 9e4dfe3

Browse files
committed
fix: 日志下载数据重复问题 #1010158081152756783
1 parent 895e2b9 commit 9e4dfe3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

bklog/apps/log_unifyquery/constants.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,5 @@ class AggTypeEnum(Enum):
9595
OperatorEnum.IS_TRUE["operator"]: {"operator": "eq", "condition": "or"},
9696
OperatorEnum.IS_FALSE["operator"]: {"operator": "eq", "condition": "or"},
9797
}
98+
99+
SEARCH_AFTER_KEY = "search_after"

bklog/apps/log_unifyquery/handler/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
)
5252
from apps.log_search.permission import Permission
5353
from apps.log_search.utils import handle_es_query_error
54-
from apps.log_unifyquery.constants import BASE_OP_MAP, MAX_LEN_DICT
54+
from apps.log_unifyquery.constants import BASE_OP_MAP, MAX_LEN_DICT, SEARCH_AFTER_KEY
5555
from apps.log_unifyquery.handler.mapping import UnifyQueryMappingHandler
5656
from apps.log_unifyquery.utils import deal_time_format, transform_advanced_addition
5757
from apps.utils.cache import cache_five_minute
@@ -1179,7 +1179,7 @@ def search_after_result(self, search_result, sorted_fields):
11791179
result_table_options = {
11801180
key: value
11811181
for key, value in search_result.get("result_table_options", {}).items()
1182-
if value.get("search_after")
1182+
if value.get(SEARCH_AFTER_KEY)
11831183
}
11841184

11851185
if not result_table_options:

0 commit comments

Comments
 (0)