turn down es bulk size (#2013)

### What problem does this PR solve?


### Type of change

- [x] Performance Improvement
This commit is contained in:
Kevin Hu 2024-08-20 09:59:17 +08:00 committed by GitHub
parent 83c673e093
commit 5efb3476f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -348,7 +348,7 @@ def main():
chunk_count = len(set([c["_id"] for c in cks])) chunk_count = len(set([c["_id"] for c in cks]))
st = timer() st = timer()
es_r = "" es_r = ""
es_bulk_size = 16 es_bulk_size = 4
for b in range(0, len(cks), es_bulk_size): for b in range(0, len(cks), es_bulk_size):
es_r = ELASTICSEARCH.bulk(cks[b:b + es_bulk_size], search.index_name(r["tenant_id"])) es_r = ELASTICSEARCH.bulk(cks[b:b + es_bulk_size], search.index_name(r["tenant_id"]))
if b % 128 == 0: if b % 128 == 0: