{5} Assigned, Active Tickets by Owner (Full Description) (3 matches)

List tickets assigned, group by ticket owner. This report demonstrates the use of full-row display.

deveiant (3 matches)

Ticket Summary Component Milestone Type Created
Description
#10 Fetching a zero-length string hangs Source defect 11/30/05

r_mc = MemCache::new 'localhost:11211',:urlencode=>false

=> <MemCache?: 1 servers/? buckets: ns: nil, debug: false, cmp: true, ro: false>

r_mc[0]=

=> ""

r_mc[0]

[hangs]


#7 Add access to more stats and a possibility to dump the cache Source Add New Features enhancement 09/24/05

as a proof of concept i wrote a small enhancement to the memcached class. it allows you to dump the content of the memcached. I did: - add a function to read stats slabs - get the keys of all items in each slab - iterate over all slabs at get the item keys. - query all items and return their values.

this really helps to debug.

my current code:

require 'rubygems'

require_gem 'Ruby-MemCache'

class MemCache
    def cache_dump( servers=@servers )
        asvrs = servers.select {|svr| svr.alive?}...
        cmds = self.make_command_map( "stats slabs", asvrs )..

        # Send them in parallel.
        keys = Array.new
        self.send( cmds ) do |svr,reply|
            slab_stats = self.get_items_keys(self.parse_slab_reply(reply))
        end     
        self.get_items(asvrs, keys)
    end

    def get_items (asvrs, keys)
        values = Array.new
        keys.each do | key | 
            cmds = self.make_command_map( "get #{key}", asvrs ) 
            self.send( cmds ) do |svr,value|
                values << value
            end     
        end     
        return values
    end

    def get_items_keys (asvrs, slab_ids)
        keys = Array.new
        slab_ids.each do | slab_id |
            kcmds = self.make_command_map( "stats cachedump #{slab_id} 0", asvrs ) 
            self.send( kcmds ) do |svr,reply|
                keys += self.parse_items_lines(reply)
            end     
        end     
        return keys

    end
    def parse_items_lines (reply)
        reply.map { | line | line.split(' ')[1] }
    end

    def parse_slab_reply (reply)
        reply.map{|line| line[/(\d+):/, 1].to_i }.uniq
    end
end
cache = MemCache::new '127.0.0.1:11211'
cache.debug = true
puts cache.cache_dump()


#9 gem list --remote still shows 0.0.1 Documentation defect 11/01/05

Not a problem with the library; but the default gem repository seems to have a pretty old version.


Note: See TracReports for help on using and creating reports.