Commit ef8c246
fix(rpc): release shard lock before cold-storage awaits in get_filter_changes (#145)
Closes ENG-2139
get_filter_changes held a DashMap RefMut (a parking_lot RwLock write
guard) across cold-storage .await points. On a current_thread tokio
runtime, two concurrent polls that landed on the same shard could
deadlock: the second task parked the OS thread waiting for the lock,
leaving no way for the first task to resume.
Refactored into snapshot -> cold I/O -> commit, with the RefMut scoped
to two short critical sections (no .await inside either).
Verified by temporarily forcing DashMap to 2 shards (~50% collision):
- Pre-fix: test_rpc_filter_edge_cases hung 10 of 30 runs.
- Post-fix: 0 of 30. Default shard count (~128 on dev, ~8 on 2-core
CI) made the hang rare enough to slip through into main.
Also adds .config/nextest.toml with a 5-minute per-test timeout so any
future hang fails fast instead of burning the GitHub Actions 6-hour
job ceiling (the failure mode of node-components#134).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent ac7c174 commit ef8c246
3 files changed
Lines changed: 62 additions & 37 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1057 | 1057 | | |
1058 | 1058 | | |
1059 | 1059 | | |
1060 | | - | |
1061 | | - | |
1062 | | - | |
1063 | | - | |
1064 | | - | |
1065 | | - | |
1066 | | - | |
1067 | | - | |
1068 | | - | |
1069 | | - | |
1070 | | - | |
1071 | | - | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
1072 | 1088 | | |
1073 | 1089 | | |
1074 | | - | |
1075 | | - | |
1076 | | - | |
1077 | | - | |
1078 | | - | |
1079 | | - | |
1080 | | - | |
1081 | | - | |
1082 | | - | |
1083 | | - | |
1084 | | - | |
1085 | | - | |
1086 | | - | |
1087 | | - | |
1088 | 1090 | | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
1089 | 1094 | | |
1090 | | - | |
1091 | | - | |
1092 | | - | |
1093 | | - | |
1094 | | - | |
1095 | | - | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
1096 | 1102 | | |
1097 | 1103 | | |
1098 | 1104 | | |
1099 | 1105 | | |
1100 | | - | |
| 1106 | + | |
1101 | 1107 | | |
1102 | 1108 | | |
1103 | 1109 | | |
1104 | | - | |
1105 | | - | |
| 1110 | + | |
1106 | 1111 | | |
1107 | | - | |
| 1112 | + | |
1108 | 1113 | | |
1109 | 1114 | | |
1110 | 1115 | | |
| |||
1128 | 1133 | | |
1129 | 1134 | | |
1130 | 1135 | | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
1131 | 1143 | | |
1132 | | - | |
1133 | 1144 | | |
| 1145 | + | |
| 1146 | + | |
1134 | 1147 | | |
1135 | 1148 | | |
1136 | 1149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
163 | 169 | | |
164 | 170 | | |
165 | 171 | | |
| |||
0 commit comments