Commit 028b096
committed
[Bugfix][KV Offloading] Drop conflicting finished-req store jobs to prevent data corruption
When _finished_req_store_jobs contains a store job and the block is
reallocated to a new request, the store job would read corrupted data.
Fix: In build_connector_meta, after merging _finished_req_store_jobs into
store_jobs, check if any of those jobs' blocks are in
_current_batch_allocated_block_ids. If so, drop the job entirely (same
behavior as before the request_finished fix — the last block is simply
not offloaded when its block is reused).
This prevents the race where wait() is called on an unsubmitted job
(no-op), allowing block corruption before the store reads it.
Signed-off-by: Alex <alex.tech.lab@outlook.com>1 parent 98cffbc commit 028b096
2 files changed
Lines changed: 53 additions & 9 deletions
File tree
- tests/v1/kv_connector/unit/offloading_connector
- vllm/distributed/kv_transfer/kv_connector/v1/offloading
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2902 | 2902 | | |
2903 | 2903 | | |
2904 | 2904 | | |
| 2905 | + | |
| 2906 | + | |
| 2907 | + | |
2905 | 2908 | | |
2906 | | - | |
| 2909 | + | |
2907 | 2910 | | |
2908 | 2911 | | |
2909 | 2912 | | |
2910 | 2913 | | |
2911 | | - | |
2912 | | - | |
| 2914 | + | |
| 2915 | + | |
2913 | 2916 | | |
2914 | 2917 | | |
2915 | 2918 | | |
| |||
Lines changed: 47 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
930 | 930 | | |
931 | 931 | | |
932 | 932 | | |
933 | | - | |
934 | | - | |
935 | | - | |
| 933 | + | |
| 934 | + | |
936 | 935 | | |
937 | 936 | | |
938 | 937 | | |
| |||
987 | 986 | | |
988 | 987 | | |
989 | 988 | | |
990 | | - | |
991 | | - | |
992 | | - | |
| 989 | + | |
993 | 990 | | |
994 | 991 | | |
995 | 992 | | |
| |||
1137 | 1134 | | |
1138 | 1135 | | |
1139 | 1136 | | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
1140 | 1141 | | |
1141 | 1142 | | |
1142 | 1143 | | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
1143 | 1184 | | |
1144 | 1185 | | |
1145 | 1186 | | |
| |||
0 commit comments