Skip to content

Commit

Permalink
Add some comment for the usage of MetaLockUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
caiconghui [蔡聪辉] committed Dec 3, 2020
1 parent 0df43a0 commit 17c0d45
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
import java.util.List;
import java.util.concurrent.TimeUnit;

/**
* MetaLockUtils is a helper class to lock and unlock all meta object in a list.
* In order to escape dead lock, meta object in list should be sorted in ascending
* order by id first, and then MetaLockUtils can lock them.
*/
public class MetaLockUtils {

public static void readLockDatabases(List<Database> databaseList) {
Expand Down

0 comments on commit 17c0d45

Please sign in to comment.