about AddPullCB size check
- Dominant language
- C++
- Stars
- 1.6k
- Forks
- 540
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/dmlc/ps-lite/blob/master/include/ps/kv_app.h#L689
```c++
template
template
int KVWorker::AddPullCB(
const SArray& keys, C* vals, D* lens, int cmd,
const Callback& cb) {
int ts = obj_->NewRequest(kServerGroup);
AddCallback(ts, [this, ts, keys, vals, lens, cb]() mutable {
...
if (vals->empty()) {
vals->resize(total_val);
} else {
CHECK_EQ(vals->size(), total_val); // here
}
...
});
return ts;
}
```
IMO, `vals` is the buffer to store pull results. So it does not have to be equal to `total_val`. Greater size should also be allowed. So I propose changing to `CHECK_GE(vals->size(), total_val);`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.