what is best approach to avoid race condition if same field of same document needs to be updated by multiple instance of spring boot application.
for updating field do i need to use spring repository or mongotemplate query based or any other best approach is there for this kind of scenario.