This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import "bytes" | |
| import "time" | |
| import "fmt" | |
| func ClusterSlot(key []byte) uint16 { | |
| if start := bytes.IndexByte(key, '{'); start >= 0 { | |
| if end := bytes.IndexByte(key[start+1:], '}'); end > 0 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Sun Jun 14 18:23:12 CEST 2015 | |
| stkbarPos=0 len(stkbar)=1 goid=1025 gcphase=2 | |
| fatal error: g already has stack barriers | |
| runtime stack: | |
| runtime.throw(0x7403d0, 0x1c) | |
| /data2/ds/local/go/src/runtime/panic.go:527 +0x96 | |
| runtime.scanstack(0xc209a40840) | |
| /data2/ds/local/go/src/runtime/mgcmark.go:334 +0x4f4 | |
| runtime.gcphasework(0xc209a40840) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fatal error: unexpected signal during runtime execution | |
| [signal 0xb code=0x80 addr=0x0 pc=0x41be2a] | |
| runtime stack: | |
| runtime.throw(0x7586d0, 0x2a) | |
| /data2/ds/local/go/src/runtime/panic.go:527 +0x96 | |
| runtime.sigpanic() | |
| /data2/ds/local/go/src/runtime/sigpanic_unix.go:12 +0x5a | |
| runtime.mSpan_Sweep(0x7f9a7c0b8c00, 0xa1900000a00, 0xc01) | |
| /data2/ds/local/go/src/runtime/mgcsweep.go:182 +0x1ba |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <signal.h> | |
| #include "hiredis.h" | |
| #include "async.h" | |
| #include "adapters/libevent.h" | |
| void subCallback(redisAsyncContext *c, void *r, void *priv) { | |
| redisReply *reply = r; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <signal.h> | |
| #include <time.h> | |
| #include "hiredis.h" | |
| #include "async.h" | |
| #include "adapters/ae.h" | |
| #include "sha1.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <unistd.h> | |
| #include <fcntl.h> | |
| #include <sys/types.h> | |
| #include <sys/stat.h> | |
| #include <sys/ioctl.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Change propagateExpire function in db.c as follows: | |
| void propagateExpire(redisDb *db, robj *key) { | |
| /* HORRIBLE HACK STARTS HERE */ | |
| /* robj *argv[2]; */ | |
| robj *argv[3]; | |
| /* HORRIBLE HACK ENDS HERE */ | |
| argv[0] = shared.del; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var redis = require('redis') | |
| var rc = redis.createClient(6379, 'localhost'); | |
| function create( target, callback ) | |
| { | |
| x = [] | |
| for ( var i=0; i<40; ++i ) | |
| { | |
| // Only 100K entries in the reverse index | |
| var n = 1000*Math.round(Math.random()*100000); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| global | |
| daemon | |
| maxconn 256 | |
| defaults | |
| mode tcp | |
| timeout connect 5000ms | |
| timeout client 50000ms | |
| timeout server 50000ms |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rubygems' | |
| gem 'redis', '3.0.0.rc1' | |
| require 'redis' | |
| require 'redis/distributed' | |
| # Create a client for 3 distributed Redis instances | |
| $r = Redis::Distributed.new %w[redis://localhost:6380 redis://localhost:6381 redis://localhost:6382] | |
| # Set 1000 items in distributed Redis |
NewerOlder