line 569, 570. The struct already contains value for dbID then why it is repeated at next line (570)?

Comment From: rustyhowell

It looks like this was cleaned up a couple months ago. https://github.com/antirez/redis/commit/6dead2cff563375543b23c1ecec78a1462ad611a