Description
DCP connections with long names break the STATS "dcp" command. (See MB-34280). cbbackupmgr should generate names that are no longer than the memcached limit.
Attachments
Issue Links
- blocks
-
MB-34280 Memcached should disallow DCP connections with names greater than 200 characters (was: ns_server connections may be terminated if a client uses a long DCP_OPEN.name)
-
- Closed
-
All the DCP tools in the 'backup' repository rely on the following function to generate the DCP stream names:
generateStreamName
func generateStreamName() string {
startTime := time.Now()
return fmt.Sprintf("%s_%s_%d", version.Cmd, startTime.Format(time.RFC3339), startTime.UnixNano()%100000)
}
This will result in:
1) 'cbbackupmgr' / 'cbexport'
2) '2006-01-02T15:04:05Z07:00'
3) Variable length integer with a max of 5 characters
This will result in < 50 characters. Please note that for each DCP worker we postfix '_${WORKER_ID}'; even still, we should be under the 200 character limit.