Skip to content

fix datasource not accurate - #492

Merged
wonderflow merged 1 commit into
qiniu:masterfrom
wonderflow:fixconfigs
May 22, 2018
Merged

wonderflow merged 1 commit into
qiniu:masterfrom
wonderflow:fixconfigs

Conversation

@wonderflow

Copy link
Copy Markdown
Contributor

Fixes [issue number]

Changes

  • feature1
  • feature2
  • fixbug1
  • fixbug2

Reviewers

  • @[someone] please review
  • @[someotherone] please review

Wiki Changes

  • options1...
  • options2...

Checklist

  • Rebased/mergable
  • Tests pass
  • Wiki updated

Comment thread mgr/mgr.go
func (m *Manager) setRunnerConfig(filename string, conf RunnerConfig) {
m.lock.Lock()
m.runnerConfig[filename] = conf
m.lock.Unlock()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这边不用defer m.lock.unlock() ? readRunners里用的是defer

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个一样的

Comment thread reader/bufreader.go Outdated

lastErrShowTime time.Time

// 这里的变量用于记录buffer中的数据从底层的那个DataSource出来的,用于精准定位seqfile的DataSource

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

哪个

Comment thread reader/seqfile.go Outdated
sf.newLineNotAdded = true
}
}
sf.justOpenedNewFile = true

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

放在sf.open(fi)后?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以

Comment thread reader/bufreader.go
b.lastRdByteIndex = b.w + idx
}
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. b.lastRdSource不用更新?
  2. 这个放在err != nil后会不会更好?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

必须放在 b.w+=n之前,b.lastRdSource在上面会被更新

@wonderflow
wonderflow merged commit 0b06ec0 into qiniu:master May 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants