Revert "libnetwork/networkdb: use correct index in GetTableByNetwork"

This reverts commit d5c370dee6.

Signed-off-by: Rob Murray <rob.murray@docker.com>
This commit is contained in:
Rob Murray
2025-06-11 12:05:45 +01:00
parent cfd5e5e4d4
commit e079583ab4

View File

@@ -430,7 +430,7 @@ type TableElem struct {
// returns a map of keys and values
func (nDB *NetworkDB) GetTableByNetwork(tname, nid string) map[string]*TableElem {
nDB.RLock()
root := nDB.indexes[byTable].Root()
root := nDB.indexes[byNetwork].Root()
nDB.RUnlock()
entries := make(map[string]*TableElem)
root.WalkPrefix([]byte(fmt.Sprintf("/%s/%s", tname, nid)), func(k []byte, v *entry) bool {