You have the list of all servers right? Just query them individually? if
it's just for debugging it should take you a few minutes to code soemthing
yup; you could even use a bash script.

On Thu, 2 Aug 2018, Om Kale wrote:

> The reason I am trying to do this is for better debugging. In case something 
> goes wrong in the system and I am unable to get the value stored for a
> particular key, I can go ahead and use this functionality to understand on 
> which server that particular key is stored.
> Also, the second question about why the printing doesn't work. Is there any 
> other way to check on which server a key is stored.
> Additionally, when you say brute force, how would I be able to do it on 
> memcached server as I will not know on which server instance the key is 
> stored.
> Could you please elaborate on this?
>
> Thanks and Regards,Om Kale
>
> On Thu, Aug 2, 2018 at 4:27 PM, dormando <dorma...@rydia.net> wrote:
>       Why are you trying to do this? That's generally a bad sign, the
>       replication is for redundancy. if you're just trying to confirm it 
> works,
>       you can do a brute force search for the key
>
>       On Thu, 2 Aug 2018, Om Kale wrote:
>
>       > Hi All,I have enabled replication (using --NUMBER_OF_REPLICAS) and 
> ketama hashing.
>       > This means, I will have replicas of keys stored on different servers 
> memntioned in my server list.
>       >
>       > My question is, is there any way of retrieving the list of servers 
> where replicas of a particular key lie, in libmemcached?
>       > Example: If I give a key, I need all the servers where replicas of 
> that key are stored.
>       >
>       > For getting one server where key is stored, I use this:
>       > const struct memcached_instance_st *server;server = const 
> memcached_instance_st * memcached_server_by_key(memcached_st *ptr, const
>       > char *key, size_t key_length, memcached_return_t *error);
>       >
>       >
>       >   However, I am unable to print the hostname from the returned 
> structure using server->hostname
>       >
>       >   in a .c file. Can this info not be printed?
>       >
>       > Thanks and Regards,
>       >
>       > Om Kale
>       >
>       >
>       >
> > --
> >
> > ---
> > You received this message because you are subscribed to the Google Groups 
> > "memcached" group.
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to memcached+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
> >
> >
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups 
> "memcached" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to memcached+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups 
> "memcached" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to memcached+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"memcached" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to memcached+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to