You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WarnfCtx(ctx, "DCP sharded import connection string includes %s=%d, which is more than the implicit %s=%d. This will result in increased memory usage.", kvBufferSizeKey, *connStrKvBufferSize, kvBufferSizeKey, idealKvConnectionBufferSize)
WarnfCtx(ctx, "DCP sharded import connection string includes %s=%d, which is more than the implicit %s=%d. This will result in increased memory usage.", kvBufferSizeKey, *connStrKvBufferSize, kvBufferSizeKey, idealKvConnectionBufferSize)
// getGoCBConnSpec returns a gocb connection spec based on the server string. The provided defaults will be used only when the corresponding property is not set in the connection string.
// getIntFromConnStr returns a query parameter from a connection string. If it doesn't exist, return nil and no error. If there's an error in parsing the connection string, return an error.
returnnil, fmt.Errorf("Multiple %s values found in connection string %s", key, connstr)
94
+
}
95
+
iflen(arg) >1 {
96
+
returnnil, fmt.Errorf("multiple %s values found in connection string %q", key, spec.String())
101
97
}
102
98
103
-
i, err:=strconv.Atoi(arg[0])
99
+
varvalueany
100
+
switchany(*new(T)).(type) {
101
+
caseint:
102
+
i, err:=strconv.Atoi(arg[0])
103
+
iferr!=nil {
104
+
returnnil, fmt.Errorf("invalid %s value %s in connection string %q, must be int", key, arg[0], spec.String())
105
+
}
106
+
value=i
107
+
casestring:
108
+
value=arg[0]
109
+
}
110
+
typed:=value.(T)
111
+
return&typed, nil
112
+
}
113
+
114
+
// getIntFromConnStr returns a query parameter from a connection string. If it doesn't exist, return nil and no error. If there's an error in parsing the connection string, return an error.
0 commit comments