wso2 / product-sp

An open source, cloud-native streaming data integration and analytics product optimized for agile digital businesses
https://wso2.com/analytics-and-stream-processing/
Apache License 2.0
120 stars 132 forks source link

Concurrent Modification Exceptions when frequent state persistence is happening #1037

Open tishan89 opened 5 years ago

tishan89 commented 5 years ago

Description: ConcurrentModificationExceptions can happen at here when state persistence interval is low. This will cause persisting thread to exit and halt state persistence. Solution is two fold.

  1. Protect state persistence thread using a try throwable block
  2. Use a concurrent HashMap here.

Affected Product Version: SP 4.3.0, APIM-Analytics 2.6.0

Steps to reproduce: Run a system with multiple Siddhi apps with low persistence interval(1 min)

ramindu90 commented 5 years ago

Fixed with the following PRs. https://github.com/siddhi-io/siddhi/pull/1459 https://github.com/wso2/carbon-analytics/pull/1726