lostsnow
lostsnow
`Warning: Unused local variable 'me' before the end of line` 这类的错误行号指向的是函数声明的结尾(大括号), 而不是变量声明的地方
 ``` /data/item/l/lost-dao.c line 31: Warning: is_weapon() inherited from both /feature/itemmake.c and /inherit/weapon/blade.c; using the definition in /feature/itemmake.c. before the end of file ``` 还一种是这样的 继承了两个 有重名函数 报错行号指向了文件末尾
test case: ```diff --- a/testsuite/include/globals.h +++ b/testsuite/include/globals.h @@ -32,4 +32,6 @@ #define M_STATUS "status" #define M_SAY "say" +#define ERR_TEST "test + #define CLEAN_UP "/inherit/clean_up" diff --git a/testsuite/single/master.c b/testsuite/single/master.c index fa82a9c4..b603a3d6...
test case: ```diff --- a/testsuite/clone/user.c +++ b/testsuite/clone/user.c @@ -35,6 +35,7 @@ logon() string query_name() { + write(ERR_TEST); return name; } diff --git a/testsuite/include/globals.h b/testsuite/include/globals.h index fa6f0f99..2479e18b 100644 --- a/testsuite/include/globals.h +++...
one line if-else statement block (string is split into multiple lines) ```lpc if (i > 5) return "aa" "bb"; ``` Expected result: Can add braces to one line statement block
* mysql 配置的是 time_zone +08:00 * clickhouse 是 Asia/Shanghai (确实是在 config.xml 里配置的), 上面在clickhouse `select now()` 也确实是正确时区的时间 * clickhouse 所在机器 Asia/Shanghai * mysql 里字段类型是 datetime * bifrost 所在机器时区 Asia/Shanghai 但是同步完时区就不对了
另: 我把clickhouse的时区改成UTC, 得到的结果反而是正常的 下面是一个 mysql 设置+8, clickhouse UTC 的例子,由mysql 同步到 clickhouse 后时区反而正常了(我现在临时这样用的) 机器时区(都是这个) ``` $ echo $TZ Asia/Shanghai ``` mysql: ``` mysql> show variables like 'time_zone'; +---------------+--------+ | Variable_name |...
找到问题了 Bifrost 使用 docker 运行的, 而容器默认时区是 UTC .. (可以在文档里提醒一下 `-v /etc/localtime:/etc/localtime`)
``` 2020/10/16 11:23:13 goroutine 110 [running]: runtime/debug.Stack(0xd0fae1, 0x54, 0xc0006d3328) /usr/local/go/src/runtime/debug/stack.go:24 +0x9f github.com/brokercap/Bifrost/Bristol/mysql.(*mysqlConn).DumpBinlog.func2.1(0xc000220750, 0xc0006d3d58) /root/BifrostBuildSource/v1.5.x/Bristol/mysql/binlog.go:586 +0x1b3 panic(0xc6c760, 0xc0009acf60) /usr/local/go/src/runtime/panic.go:969 +0x175 github.com/brokercap/Bifrost/Bristol/mysql.(*eventParser).parseEventRow(0xc000220750, 0xc000732b70, 0xc0006e82c0, 0xc00078b400, 0x48, 0x80, 0x0, 0x0, 0x0) /root/BifrostBuildSource/v1.5.x/Bristol/mysql/event_row.go:379 +0x53b8...
又看了下 超时不是 Fastdfs 导致的 是两个 Fastdht 之间 会一直超时一直重连 A->B 会超时 但是 B->A 不会 A: ``` accept(0, 0x7ffe74d03ee0, 0x7ffe74d03edc) = -1 EAGAIN (Resource temporarily unavailable) accept(0, 0x7ffe74d03ee0, 0x7ffe74d03edc) = -1 EAGAIN...