We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
构造Binlog对象时的seq参数为何没有进行大小端转换再写入,load的时候seq也没有进行转换?
Binlog::Binlog(uint64_t seq, char type, char cmd, const leveldb::Slice &key){ buf.append((char *)(&seq), sizeof(uint64_t)); buf.push_back(type); buf.push_back(cmd); buf.append(key.data(), key.size()); }
int Binlog::load(const leveldb::Slice &s){ if(s.size() < HEADER_LEN){ return -1; } buf.assign(s.data(), s.size()); return 0; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
构造Binlog对象时的seq参数为何没有进行大小端转换再写入,load的时候seq也没有进行转换?
Binlog::Binlog(uint64_t seq, char type, char cmd, const leveldb::Slice &key){
buf.append((char *)(&seq), sizeof(uint64_t));
buf.push_back(type);
buf.push_back(cmd);
buf.append(key.data(), key.size());
}
int Binlog::load(const leveldb::Slice &s){
if(s.size() < HEADER_LEN){
return -1;
}
buf.assign(s.data(), s.size());
return 0;
}
The text was updated successfully, but these errors were encountered: