Skip to content

Commit

Permalink
Merge pull request #32 from weibocom/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
hustfisher authored Nov 5, 2021
2 parents 724144f + 191c357 commit 3a8424b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion endpoint/src/cacheservice/topology/inner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl<T> Inner<T> {
sorted.sort_by(|a, b| a.1.cmp(&b.1));
let mut layers = Vec::with_capacity(sorted.len());
for (role, pool, streams) in sorted {
log::info!(
log::debug!(
"builded for layer:{:?}, pool:{}, addr:{:?}",
role,
pool,
Expand Down
7 changes: 6 additions & 1 deletion stream/src/io/receiver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,12 @@ impl Receiver {
if let Some(ref mut req) = self.req {
req.set_request_id(*rid);
metric.req_done(req.operation(), req.len(), req.keys().len());
log::debug!("parsed: {} => {}", self.buff, req);
log::debug!(
"parsed client req/{:?}: {} => {}",
req.id(),
self.buff,
req
);
ready!(writer.as_mut().poll_write(cx, &req))?;
self.buff.advance_read(req.len());
}
Expand Down
7 changes: 7 additions & 0 deletions stream/src/io/sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ impl Sender {
while self.buf.len() > 0 {
let data = self.buf.as_bytes();
let n = ready!(w.as_mut().poll_write(cx, data))?;
log::debug!(
"flush to client, rid:{:?}/{}/{} - {:?}",
rid,
n,
data.len(),
data
);
if n == 0 {
return Poll::Ready(Err(Error::new(ErrorKind::WriteZero, "write zero response")));
}
Expand Down

0 comments on commit 3a8424b

Please sign in to comment.