Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mreiferson committed Oct 18, 2015
1 parent 400ba11 commit 5d90873
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions nsqd/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),

Expand All @@ -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),
Expand Down
4 changes: 2 additions & 2 deletions nsqd/topic.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 5d90873

Please sign in to comment.