Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The memcached API provides an option to tell addServer what weight to give each server. this is handy in case you have several servers with different memory sizes (by default the key distribution is equal among the servers) . The Drupal module settings do not allow you to set this option. It will be nice as a feature in the next release.
Comment | File | Size | Author |
---|---|---|---|
#7 | 332094-4.patch | 18.23 KB | Jeremy |
#6 | 332094-3.patch | 9.15 KB | Jeremy |
#5 | memcache-server-weight-332094-5.patch | 2.28 KB | markpavlitski |
#2 | dmemcache.inc_.server_weight.patch | 2.35 KB | nirl |
Comments
Comment #1
nirl CreditAttribution: nirl commentedi will provide a patch for the 5.x version in the next week or so. Please do not bother with this at the moment.
Comment #2
nirl CreditAttribution: nirl commentedi am summiting a patch against the 5.x-1.x-dev version.
whoever adds this patch to the CVS please also note that i've added a comment to the memcache_object function that should actually go into the readme file after the prefix part. or else no one will ever know how to use it.
also note that this patch is designed to be 100% backward compatible if you decide not to use the new feature.
Comment #3
nirl CreditAttribution: nirl commentedComment #4
catchThis may be still valid as a feature request.
Comment #5
markpavlitski CreditAttribution: markpavlitski commentedPatch for 7.x-1.x.
Adds optional server weight support for both extensions.
Compatible with existing $conf settings.
Can be fairly easily extended to allow additional options on a per-server basis.
Comment #6
Jeremy CreditAttribution: Jeremy at Tag1 Consulting commentedI've reworked this and added documentation. It seems to work great with the PECL Memcached extension, but there's a lingering problem with the PECL Memcache extension. Specifically we're blocked by #2707407: Infinite recursion during bootstrap if lock_acquire() fails due to invalid Memcache URL as we can't specify weight during calls to
p/connect()
, but we get stuck in an infinite loop if we're using justaddServer()
.Anyway, work in progress attached.
Comment #7
Jeremy CreditAttribution: Jeremy at Tag1 Consulting commentedRefreshing patch; this addresses the infinite recursion bug, however I'm seeing some oddities around persistent connections (which may or may not be related to this patch) and currently the memcache_admin stats pages is broken for the Memcached PECL extension.
Comment #9
Jeremy CreditAttribution: Jeremy at Tag1 Consulting commentedFinal round of cleanup, this seems to work well in all my testing. Committed.
Comment #10
Jeremy CreditAttribution: Jeremy at Tag1 Consulting commented