• wu-sheng's avatar
    Remove synchronous persistence mechanism in API level and ElasticSearch implementation (#7293) · de975c7e
    wu-sheng 提交于
    * Performance: remove the synchronous persistence mechanism from batch ElasticSearch DAO. Because the current enhanced persistent session mechanism, don't require the data queryable immediately after the insert and update anymore.
    * Performance: share `flushInterval` setting for both metrics and record data, due to `synchronous persistence mechanism` removed. Record flush interval used to be hardcoded as 10s.
    * Remove `syncBulkActions` in ElasticSearch storage option.
    * Increase the default bulkActions(env, SW_STORAGE_ES_BULK_ACTIONS) to 5000(from 1000).
    * Increase the flush interval of ElasticSearch indices to 15s(from 10s)
    
    Add these 2 references. According to these, **(same _index, _type and _id) in same bulk will be in order**
    1. https://github.com/elastic/elasticsearch/issues/50199
    2. https://discuss.elastic.co/t/order-of--bulk-request-operations/98124
    
    Notice, the order of different bulks is not guaranteed by the ElasticSearch cluster. We are going to have the risk of dirty write. But consider we set over 20s period between flush, and index flush period is 10, we should be safe.
    
    Recommend 5000 bulk size and 15s flush interval only. The persistent period has been set to 25s.
    de975c7e
configuration-vocabulary.md 36.5 KB