Skip to content

Commit e4096cc

Browse files
Implement RCM code
Signed-off-by: Niranjani Vivek <niranjaniv@google.com>
1 parent 5b93368 commit e4096cc

File tree

6 files changed

+596
-1
lines changed

6 files changed

+596
-1
lines changed

translib/db/db.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,11 @@ type Options struct {
168168
KeySeparator string //Overriden by the DB config file's separator.
169169
IsWriteDisabled bool //Is write/set mode disabled ?
170170
IsCacheEnabled bool //Is cache (Per Connection) allowed?
171+
// Redis connection pools do not support transactional Redis operations.
172+
// If the DB object will be used to perform transactions, the Transacation
173+
// flag must be set to request a unique Redis client. Transactions include
174+
// SCAN and MULTI.
175+
TransactionsRequired bool
171176

172177
// OnChange caching for the DBs passed from Translib's Subscribe Infra
173178
// to the Apps. SDB is the SubscribeDB() returned handle on which

translib/db/db_redis_opts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func adjustRedisOpts(dbOpt *Options) *redis.Options {
144144
return &redisOpts
145145
}
146146

147-
func init() {
147+
func initializeRedisOpts() {
148148
flag.StringVar(&goRedisOpts, "go_redis_opts", "", "Options for go-redis")
149149
}
150150

0 commit comments

Comments
 (0)