Skip to content

Duplicated dbid in redis multi-instances causes error #5351

@BrynXu

Description

@BrynXu

Description
Ideally dbid in different redis instances can be duplicated, but due to following code:

const TableNameSeparatorMap TableBase::tableNameSeparatorMap = {
   { APPL_DB,             TABLE_NAME_SEPARATOR_COLON },
   { ASIC_DB,             TABLE_NAME_SEPARATOR_COLON },
   { COUNTERS_DB,         TABLE_NAME_SEPARATOR_COLON },
   { LOGLEVEL_DB,         TABLE_NAME_SEPARATOR_COLON },
   { CONFIG_DB,           TABLE_NAME_SEPARATOR_VBAR  },
   { PFC_WD_DB,           TABLE_NAME_SEPARATOR_COLON },
   { FLEX_COUNTER_DB,     TABLE_NAME_SEPARATOR_COLON },
   { STATE_DB,            TABLE_NAME_SEPARATOR_VBAR  },
   { GB_ASIC_DB,          TABLE_NAME_SEPARATOR_VBAR  },
   { GB_COUNTERS_DB,      TABLE_NAME_SEPARATOR_VBAR  },
   { GB_FLEX_COUNTER_DB,  TABLE_NAME_SEPARATOR_VBAR  },
   { GLOBAL_APP_DB,       TABLE_NAME_SEPARATOR_VBAR  }
};

dup dbid in different instances will cause problem.

Steps to reproduce the issue:
1.
2.
3.

Describe the results you received:

Describe the results you expected:

Additional information you deem important (e.g. issue happens only occasionally):

**Output of `show version`:**

```
(paste your output here)
```

**Attach debug file `sudo generate_dump`:**

```
(paste your output here)
```

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions