Memorystore Redis is now not working with Servicestack Redis driver

47 views
Skip to first unread message

biswajit....@digitalavenues.com

unread,
Sep 6, 2019, 2:47:34 AM9/6/19
to Google Cloud Memorystore Discuss
We have a Memorystore Redis running from last month on our QA environment. Our application is using Servicestack Redis driver (https://servicestack.net/redis) to connect Redis. We have deleted that Redis instance yesterday and created a new one because we need to change the Redis Instance name with a better naming convention. Our application is now not working and getting an error when connecting Redis through Servicestack Redis driver. It is showing error as "An item with the same key has already been added".  After investigation, we found that now Memorystore Redis has introduced a new INFO section # oom-prevention (The INFO command returns information and statistics about the server). This section was not present earlier. This section contains the following two keys which are also present under the MEMORY section.
  • used_memory_rss
  • used_memory_rss_human
I am not sure why Memorystore Redis has introduced this new section having the key with same name present in other section.

From the Servicestack library code present in Github we able to find out that it creates a Dictionary of INFO object during initialization. As there are duplicate keys so it unable to create the dictionary and throwing error "An item with the same key has already been added".

        public Dictionary<string, string> Info
       
{
           
get
           
{
               
var lines = SendExpectString(Commands.Info);
               
var info = new Dictionary<string, string>();
               
foreach (var line in lines
                   
.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries))
               
{
                   
var p = line.IndexOf(':');
                   
if (p == -1) continue;
                    info
.Add(line.Substring(0, p), line.Substring(p + 1));
               
}
               
return info;
           
}
       
}


We are about to go live next week and now we are in a big mess. How could google change something without any notification which can affect an application. 

Really appreciate any suggestion on how to overcome this within next two days. We are trying to connect Servicestack but not sure if they are aware of this issue and will be able to provide us an updated library in the next two days.

Zhenyu Zhao

unread,
Sep 6, 2019, 2:01:01 PM9/6/19
to Google Cloud Memorystore Discuss
Hello,

I'm sorry for such inconvenience. We are working on the fix.
Please cotact us directly to find out a mitigation approach for you.

Thanks,
Reply all
Reply to author
Forward
0 new messages