Commit 1d84ea6
authored
routing: ignore duplicate dataclients (#3527)
Ignore duplicate dataclients since this is likely a misconfiguration.
Note that datasource still allows multiple pointer dataclients of the
same type or non-equal value-type dataclients.
Routing constructor does not return error and we generally do not use
panic therefore ignoring and logging an error is the only simple option.
This is also needed because datasource manages routes keyed by
DataClient and to correctly signal first route load.
Follow up on #3447
Signed-off-by: Alexander Yastrebov <alexander.yastrebov@zalando.de>1 parent 52da8f0 commit 1d84ea6
3 files changed
Lines changed: 64 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
259 | 261 | | |
260 | 262 | | |
261 | 263 | | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
262 | 277 | | |
263 | 278 | | |
264 | 279 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
861 | 861 | | |
862 | 862 | | |
863 | 863 | | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
864 | 871 | | |
865 | 872 | | |
866 | 873 | | |
| |||
963 | 970 | | |
964 | 971 | | |
965 | 972 | | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
966 | 977 | | |
967 | 978 | | |
968 | 979 | | |
| |||
975 | 986 | | |
976 | 987 | | |
977 | 988 | | |
978 | | - | |
| 989 | + | |
979 | 990 | | |
980 | 991 | | |
981 | 992 | | |
| |||
986 | 997 | | |
987 | 998 | | |
988 | 999 | | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
989 | 1004 | | |
990 | 1005 | | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
0 commit comments