Commit cea721e
committed
fix: fix type mismatch and index issues in service search and metadata sync
1. pkg/console/service/service.go:132
- fix generic type mismatch with resourceKind
- generic ServiceResource should use ServiceKind, was incorrectly passing ServiceProviderMetadataKind
- index changed from ByServiceProviderServiceName to ByServiceName (aligned with ServiceKind)
2. pkg/core/discovery/subscriber/service_provider_metadata.go
- processUpdate: remove redundant oldRes key check (oldKey always equals newKey in same resource update,
else branch is unreachable dead code)
- syncService: use ByServiceProviderServiceKey index instead of ByServiceProviderServiceName
+ manual version/group filtering, reduces data returned from DB and improves performance
Ref: [1460](#1460 (comment))1 parent 822cd01 commit cea721e
2 files changed
Lines changed: 10 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
| 145 | + | |
145 | 146 | | |
146 | 147 | | |
147 | | - | |
| 148 | + | |
| 149 | + | |
148 | 150 | | |
149 | 151 | | |
150 | 152 | | |
| |||
Lines changed: 4 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | 131 | | |
143 | 132 | | |
144 | 133 | | |
| |||
172 | 161 | | |
173 | 162 | | |
174 | 163 | | |
175 | | - | |
| 164 | + | |
176 | 165 | | |
177 | 166 | | |
178 | 167 | | |
| |||
184 | 173 | | |
185 | 174 | | |
186 | 175 | | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
| 176 | + | |
193 | 177 | | |
194 | 178 | | |
195 | 179 | | |
| |||
0 commit comments