revert to set NodesOnly and fix max index set

pull/20168/head
Dhia Ayachi 2024-01-11 15:48:49 -05:00
parent 88849c9030
commit 4ac54f10bc
No known key found for this signature in database
3 changed files with 3 additions and 4 deletions

View File

@ -233,9 +233,8 @@ func (m *Internal) ServiceDump(args *structs.ServiceDumpRequest, reply *structs.
if idx > maxIndex { if idx > maxIndex {
maxIndex = idx maxIndex = idx
} }
reply.Index = maxIndex
} }
reply.Index = maxIndex
raw, err := filter.Execute(reply.Nodes) raw, err := filter.Execute(reply.Nodes)
if err != nil { if err != nil {
return fmt.Errorf("could not filter local service dump: %w", err) return fmt.Errorf("could not filter local service dump: %w", err)

View File

@ -295,7 +295,7 @@ func (s *handlerMeshGateway) handleUpdate(ctx context.Context, u UpdateEvent, sn
QueryOptions: structs.QueryOptions{Token: s.token}, QueryOptions: structs.QueryOptions{Token: s.token},
ServiceKind: structs.ServiceKindMeshGateway, ServiceKind: structs.ServiceKindMeshGateway,
UseServiceKind: true, UseServiceKind: true,
NodesOnly: false, NodesOnly: true,
Source: *s.source, Source: *s.source,
EnterpriseMeta: *entMeta, EnterpriseMeta: *entMeta,
}, fmt.Sprintf("mesh-gateway:%s", gk.String()), s.ch) }, fmt.Sprintf("mesh-gateway:%s", gk.String()), s.ch)

View File

@ -544,7 +544,7 @@ func watchMeshGateway(ctx context.Context, opts gatewayWatchOpts) error {
QueryOptions: structs.QueryOptions{Token: opts.token}, QueryOptions: structs.QueryOptions{Token: opts.token},
ServiceKind: structs.ServiceKindMeshGateway, ServiceKind: structs.ServiceKindMeshGateway,
UseServiceKind: true, UseServiceKind: true,
NodesOnly: false, NodesOnly: true,
Source: opts.source, Source: opts.source,
EnterpriseMeta: *structs.DefaultEnterpriseMetaInPartition(opts.key.Partition), EnterpriseMeta: *structs.DefaultEnterpriseMetaInPartition(opts.key.Partition),
}, correlationId, opts.notifyCh) }, correlationId, opts.notifyCh)