From 5d908735bf3c530a58c8a2d3821e527d460515b1 Mon Sep 17 00:00:00 2001 From: Matt Reiferson Date: Thu, 15 Oct 2015 13:28:36 -0700 Subject: [PATCH] wip --- nsqd/stats.go | 8 ++++---- nsqd/topic.go | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/nsqd/stats.go b/nsqd/stats.go index 5cf037cb0..471a3ed52 100644 --- a/nsqd/stats.go +++ b/nsqd/stats.go @@ -22,8 +22,8 @@ func NewTopicStats(t *Topic, channels []ChannelStats) TopicStats { return TopicStats{ TopicName: t.name, Channels: channels, - Depth: t.Depth(), - BackendDepth: 0, // TODO: (WAL) what do we do with this? + Depth: 0, + BackendDepth: t.Depth(), MessageCount: atomic.LoadUint64(&t.messageCount), Paused: t.IsPaused(), @@ -49,8 +49,8 @@ type ChannelStats struct { func NewChannelStats(c *Channel, clients []ClientStats) ChannelStats { return ChannelStats{ ChannelName: c.name, - Depth: c.Depth(), - BackendDepth: 0, // TODO: (WAL) what do we do with this? + Depth: 0, + BackendDepth: c.Depth(), InFlightCount: len(c.inFlightMessages), DeferredCount: len(c.deferredMessages), MessageCount: atomic.LoadUint64(&c.messageCount), diff --git a/nsqd/topic.go b/nsqd/topic.go index 8a56f8662..c13b64914 100644 --- a/nsqd/topic.go +++ b/nsqd/topic.go @@ -142,14 +142,14 @@ func (t *Topic) DeleteExistingChannel(channelName string) error { return nil } -func (t *Topic) Pub(data [][]byte) error { +func (t *Topic) Pub(data [][]byte, crc []uint32) error { t.RLock() defer t.RUnlock() if atomic.LoadInt32(&t.exitFlag) == 1 { return errors.New("exiting") } // TODO: health - startIdx, endIdx, err := t.wal.Append(data) + startIdx, endIdx, err := t.wal.Append(data, crc) if err != nil { return err }