New Feature Request. #27

Closed
bhargavmist opened this Issue Aug 5, 2011 · 5 comments

Comments

Projects
None yet
3 participants
@bhargavmist

Hi Mengli,

We are currently using the Memcached client and providing the pool parameters through our custom configuration system. We are using the client object as a spring singleton wired into our main codebase.
The issue we are facing is, we want to refresh the pool when any config value is changed in our config system.

In order to do so there should be a method in SchoonerSockIOPool class which will remove the pool object from "pools" HashMap. This method will take in poolname as argument and will remove that object from the HashMap.

If we can do this then we can remove the pool object if any config value is changed and then reinitialize the pool at runtime with new values. With addition of this feature we don't have to recycle our servers everytime a config value is changed.

I was wondering how difficult it would be for you to add this feature?

Thank you for your time.

Regards,
bhargav

@mengli

This comment has been minimized.

Show comment Hide comment
@mengli

mengli Aug 7, 2011

Collaborator

Hi,

There is a method called "shutdown" in SchoonerSockIOPool, I think you can shutdown whole pools and then recreate it.

Meng Li

Collaborator

mengli commented Aug 7, 2011

Hi,

There is a method called "shutdown" in SchoonerSockIOPool, I think you can shutdown whole pools and then recreate it.

Meng Li

@bhargavmist

This comment has been minimized.

Show comment Hide comment
@bhargavmist

bhargavmist Aug 7, 2011

Yes but shutdown will not remove the previous object from the hashmap
right. So thus would be a memory leak eventually ! No??

Thanks

On Saturday, August 6, 2011, mengli
reply@reply.github.com
wrote:

Hi,

There is a method called "shutdown" in SchoonerSockIOPool, I think you can shutdown whole pools and then recreate it.

Meng Li

Reply to this email directly or view it on GitHub:
#27 (comment)

Yes but shutdown will not remove the previous object from the hashmap
right. So thus would be a memory leak eventually ! No??

Thanks

On Saturday, August 6, 2011, mengli
reply@reply.github.com
wrote:

Hi,

There is a method called "shutdown" in SchoonerSockIOPool, I think you can shutdown whole pools and then recreate it.

Meng Li

Reply to this email directly or view it on GitHub:
#27 (comment)

@mengli

This comment has been minimized.

Show comment Hide comment
@mengli

mengli Aug 7, 2011

Collaborator

Actually shutdown will remove all the connection pool which is maintained by SchoonerSockIOPool and all the sockets will be closed safely, so no memory leak will occur.

You can re-create specified connection pool after shutting it down. Don't forget to initialize the new connection pool, :)

Meng Lee

Collaborator

mengli commented Aug 7, 2011

Actually shutdown will remove all the connection pool which is maintained by SchoonerSockIOPool and all the sockets will be closed safely, so no memory leak will occur.

You can re-create specified connection pool after shutting it down. Don't forget to initialize the new connection pool, :)

Meng Lee

@bhargavmist

This comment has been minimized.

Show comment Hide comment
@bhargavmist

bhargavmist Aug 7, 2011

Ah ok, let me give it a try.

Thanks mengli.

On Sunday, August 7, 2011, mengli
reply@reply.github.com
wrote:

Actually shutdown will remove all the connection pool which is maintained by SchoonerSockIOPool and all the sockets will be closed safely, so no memory leak will occur.

You can re-create specified connection pool after shutting it down. Don't forget to initialize the new connection pool, :)

Meng Lee

Reply to this email directly or view it on GitHub:
#27 (comment)

Ah ok, let me give it a try.

Thanks mengli.

On Sunday, August 7, 2011, mengli
reply@reply.github.com
wrote:

Actually shutdown will remove all the connection pool which is maintained by SchoonerSockIOPool and all the sockets will be closed safely, so no memory leak will occur.

You can re-create specified connection pool after shutting it down. Don't forget to initialize the new connection pool, :)

Meng Lee

Reply to this email directly or view it on GitHub:
#27 (comment)

@newroot

This comment has been minimized.

Show comment Hide comment
@newroot

newroot Aug 9, 2011

Collaborator

Thanks for the immediate response.

Xingen Wang

Collaborator

newroot commented Aug 9, 2011

Thanks for the immediate response.

Xingen Wang

@newroot newroot closed this Aug 9, 2011

@newroot newroot reopened this Aug 9, 2011

@mengli mengli closed this Aug 20, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment