GithubHelp home page GithubHelp logo

cfgserver's People

Contributors

joeylichang avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

tom2jack

cfgserver's Issues

SSDB主主同步问题

我配置了主主同步,但是从master1修改了key,并没有同步到master2。但是我们用原版的SSDB是可以的,请帮忙分析一下问题,谢谢!

zclear 同步时有个bug

`int Slave::proc_z_clear(const LogEvent &event) {
assert (event.cmd() == BinlogCommand::Z_CLEAR);

Bytes key = event.key();

uint64_t offset = 0;
uint64_t limit = 1000;
int ret = 0;

uint64_t version;
char t = DataType::ZSET;
SLAVE_PROC_CHECK_VERSION(key);
if (t != DataType::ZSET) {
	log_error("unexpected data type: %" PRIu8 " expected:%" PRIu8, uint8_t(t), uint8_t(DataType::ZSET));
	return -1;
}

Transaction trans(serv->ssdb, key);
while (1) {
	ZIterator *it = serv->ssdb->zrange(key, offset, limit, version);
	int num = 0;
	while (it->next()) {
		ret = serv->ssdb->zdel(key, it->key, trans, version);
		if (ret < 0) {
			log_error("zclear zdel failed, type=%" PRId8 " seq=%" PRIu64, event.type(), event.seq());
			num = 0;
			break;
		}
		num++;
	}
	delete it;

	if (num == 0) {
		break;
	}
}

if (ret >= 0 && serv->binlog) {
	serv->binlog->write(BinlogType::SYNC, BinlogCommand::Z_CLEAR, key);
}

return ret;

}`

删除时,zdel应该如下
ret = serv->ssdb->zdel(key, it->field, trans, version);
传it->filed,否则会造成死循环,请更正一下

ksarch-saas ____migrate_slot命令问题

启动两个ssdb a和b
执行命令
set name a
slot_premigrating 5798
migrate_slot 5798 127.0.0.1 28888 60 1
slot_postmigrating 5798
执行完之后在B节点没有找到该slot的记录,麻烦帮忙看看哪儿出问题了

附上日志
273717 2017-06-13 15:45:43.711 [DEBUG] worker.cpp(35): w:0.048,p:6.159, req: slot_premigrating 5798, resp: ok
273718 2017-06-13 15:46:17.696 [INFO ] range_migrate.cpp(107): range migrating start
273719 2017-06-13 15:46:17.696 [INFO ] range_migrate.cpp(144): connect to 127.0.0.1:28888
273720 2017-06-13 15:46:17.696 [DEBUG] range_migrate.cpp(274): client init
273721 2017-06-13 15:46:17.696 [DEBUG] range_migrate.cpp(172): key migrate init, start: \xff|VERSION|\x00\xa6\x16 end: \xff|VERSION|\x00\xff\xa6\x16
273722 2017-06-13 15:46:17.696 [INFO ] range_migrate.cpp(280): there is no key to sync
273723 2017-06-13 15:46:17.696 [INFO ] range_migrate.cpp(109): range migrating quit, 0 keys sent
273724 2017-06-13 15:46:17.696 [DEBUG] serv.cpp(715): migrate quite
273725 2017-06-13 15:46:17.696 [DEBUG] worker.cpp(35): w:0.020,p:0.437, req: migrate_slot 5798 127.0.0.1 28888 60 1, resp: done
273726 2017-06-13 15:46:30.970 [INFO ] ttl.cpp(46): expiration thread start tid: 139936336439040.
273727 2017-06-13 15:46:30.970 [DEBUG] worker.cpp(35): w:0.040,p:0.178, req: slot_postmigrating 5798, resp: ok

迁移slot的时候cpu占用率高

在做大量slot(500个slot)迁移的时候,发现被迁入的节点cpu占用率很高
看代码发现一个slot对应一个线程,
这个能做下优化吗,或者给一个优化的思路。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.