Commit fbf47b8
committed
parser: don't fail on multiple SeriesReferences
Parallel parsing would occasonally fail with:
patchwork.models.MultipleObjectsReturned: get() returned more than one SeriesReference -- it returned 2!
I think these are happening if you have different processes parsing
e.g. 1/3 and 2/3 simultaneously: both will have a reference to 1/3,
in the case of 1 it will be the msgid, in the case of 2 it will be
in References. So when we come to parse 3/3, .get() finds 2 and
throws the exception.
This does not fix the creation of multiple series references; it
just causes them to be ignored. We still have serious race conditions
with series creation, but I don't yet have clear answers for them.
With this patch, they will at least not stop patches from being
processed - they'll just lead to wonky series, which we already have.
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Daniel Axtens <dja@axtens.net>1 parent d438670 commit fbf47b8
1 file changed
+21
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
239 | 246 | | |
240 | 247 | | |
241 | 248 | | |
| |||
1033 | 1040 | | |
1034 | 1041 | | |
1035 | 1042 | | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
1036 | 1046 | | |
1037 | 1047 | | |
1038 | 1048 | | |
| |||
1071 | 1081 | | |
1072 | 1082 | | |
1073 | 1083 | | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
1074 | 1089 | | |
1075 | 1090 | | |
1076 | 1091 | | |
| |||
1083 | 1098 | | |
1084 | 1099 | | |
1085 | 1100 | | |
1086 | | - | |
1087 | | - | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
1088 | 1107 | | |
1089 | 1108 | | |
1090 | 1109 | | |
| |||
0 commit comments