opensearch-project / opensearch-spark

Spark Accelerator framework ; It enables secondary indices to remote data stores.
Apache License 2.0
22 stars 33 forks source link

[BUG] Query cannot run in active session as long as the concurrent active session reach to 10 #876

Open LantaoJin opened 2 weeks ago

LantaoJin commented 2 weeks ago

What is the bug? Got follow error message when submit query in an active session: { "status": 429, "error": { "type": "ConcurrencyLimitExceededException", "reason": "Too Many Requests", "details": "domain concurrent active session can not exceed 10" } }

This is a bug to fix, since we should check the limit in create session instead of submitting query in active session.

noCharger commented 2 weeks ago

This is expected behavior. Please ref https://github.com/opensearch-project/sql/pull/2390 for details

LantaoJin commented 2 weeks ago

@noCharger no. I don't think so. The limitation implementation in my option is not correct. The limit of total concurrent active sessions should only impact the 11th session. But currently, when there are 10 concurrent active sessions, all the 10 active sessions won't work as expected. For example, you are opening a session and submit queries in this only active session you have. Now someone else create 9 sessions. You will find your active active session (actually all 10 active sessions) become "inactive" suddenly.

ykmr1224 commented 1 week ago

@LantaoJin +1. So the leaseManager.borrow should be called when creating new session.