New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: support NotFillCache kv request option #4658

Merged
merged 6 commits into from Sep 29, 2017

Conversation

Projects
None yet
4 participants
@tiancaiamao
Contributor

tiancaiamao commented Sep 27, 2017

If TiDB send a request with NotFillCache option, the LRU cache of underlying
storage will not be touched. select statement with SQL_NO_CACHE will use it.

tiancaiamao added some commits Sep 27, 2017

*: support NotFillCache kv request option
If TiDB send a request with NotFillCache option, the LRU cache of underlying
storage will not be touched. select statement with SQL_NO_CACHE will use it.
@shenli

This comment has been minimized.

Show comment
Hide comment
@shenli
Member

shenli commented Sep 27, 2017

LGTM
@coocood @disksing PTAL

@shenli

This comment has been minimized.

Show comment
Hide comment
@shenli

shenli Sep 27, 2017

Member

/run-all-tests

Member

shenli commented Sep 27, 2017

/run-all-tests

Show outdated Hide outdated executor/executor_test.go Outdated
sync.RWMutex
turnOn bool
checkFlags uint32

This comment has been minimized.

@disksing

disksing Sep 28, 2017

Member

Can't check both priority and notFillCache?

@disksing

disksing Sep 28, 2017

Member

Can't check both priority and notFillCache?

This comment has been minimized.

@tiancaiamao

tiancaiamao Sep 29, 2017

Contributor

It's two separate test, in one testSuite.

@tiancaiamao

tiancaiamao Sep 29, 2017

Contributor

It's two separate test, in one testSuite.

c.mu.RUnlock()
if turnOn {
if checkFlags == checkRequestPriority {

This comment has been minimized.

@coocood

coocood Sep 28, 2017

Member

flag value should use bit operation like checkFlags & checkRequestPriority > 0

@coocood

coocood Sep 28, 2017

Member

flag value should use bit operation like checkFlags & checkRequestPriority > 0

This comment has been minimized.

@tiancaiamao

tiancaiamao Sep 29, 2017

Contributor

I don't need to check both of them now, so this is unnecessary.

@tiancaiamao

tiancaiamao Sep 29, 2017

Contributor

I don't need to check both of them now, so this is unnecessary.

switch req.Type {
case tikvrpc.CmdCop:
if c.priority != req.Priority {
return nil, errors.New("fail to set priority")
}
}
} else if checkFlags == checkRequestNotFillCache {

This comment has been minimized.

@coocood

coocood Sep 28, 2017

Member

ditto

@coocood

coocood Sep 28, 2017

Member

ditto

@shenli

This comment has been minimized.

Show comment
Hide comment
@shenli
Member

shenli commented Sep 29, 2017

@disksing

LGTM.

@tiancaiamao tiancaiamao merged commit a6b5c66 into master Sep 29, 2017

5 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls First build on master at 72.725%
Details
jenkins-ci-tidb/build Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details

@tiancaiamao tiancaiamao deleted the tiancaiamao/not-fill-cache branch Sep 29, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment