Skip to content

Commit

Permalink
reverts without locking in case the data already exists to improve pe…
Browse files Browse the repository at this point in the history
…rformance
  • Loading branch information
shubham1g5 committed Nov 29, 2024
1 parent 25a9317 commit eea08fa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/org/commcare/cases/entity/AsyncEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ public String getNormalizedField(int i) {

@Override
public String getSortField(int i) {
if (sortData[i] != null) {
return sortData[i];
}

try (Closeable ignored = mEntityStorageCache != null ? mEntityStorageCache.lockCache() : null) {
//get our second lock.
synchronized (mAsyncLock) {
Expand Down

0 comments on commit eea08fa

Please sign in to comment.