I am working on a use case wherei had to update the documents. i have created a custom plugin with EUIBasic Table , selection option.
Now, i want to handle multiple users trying to update the same record. could you please help me understand is there any session object which i can use to identify records are already selected by some other user.
Here is an example of use case
User 1 -> opens UI and selects records 1,2,3 for update
at the same time user 2 opens UI
User 2 -> opens UI and selects records 1,2,3 for delete
and before user1 click update user 2 deletes records and now user 1 updates the same records.
so i want to achieve something like when user1 selects records and trying to work on them so noo other user should be able to select the same records as they are already selected, can we put those in some place which is common for all users.
user 1 logs in opens UI -> get lock using API PUT /fs/lock/<index_name>/_create { "lock_type": "exclusive" }
user1 will perform operations like update/delete etc
and releases lock using API DELETE /fs/lock/<index_name>
If any other user logs in and tries to access the UI the lock API will try to acquire the lock on the same index but will get error since other user has already acquired an exclusive lock(Checked this by executing APIs from Kibana Dev Tools).
To test the scenario i need to implement it Kibana custom visualization, to understand how can i execute lock APIs using CallWithRequest Client, I have opened a new topic [here](How to call lock APIs using call with request
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.