Commit 983fa51
authored
[FSSDK-11900] fix: potential concurrent issue for cmab decision (#608)
* refactor: improve thread safety in getDecision function
- Introduce a lock array to prevent race conditions
- Implement getLockIndex method for calculating lock index based on user and rule IDs
* refactor: update getLockIndex algorithm
- Replace hash function with MurmurHash3 for improved performance
- Calculate lockIndex directly instead of using intermediate variables1 parent 5f38cf5 commit 983fa51
1 file changed
+24
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
54 | 65 | | |
55 | 66 | | |
56 | 67 | | |
57 | 68 | | |
58 | 69 | | |
59 | 70 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
67 | 84 | | |
68 | | - | |
69 | | - | |
70 | 85 | | |
71 | 86 | | |
72 | 87 | | |
| |||
0 commit comments