Commit Graph

56 Commits

Author SHA1 Message Date
29a83c2cd8 executor hptc ycsb-worloade: Make use of AppendRows in all cases (#21163) 2020-11-29 16:21:00 +08:00
de4612597c transaction: lock unique key for delete operation (#19220)
Signed-off-by: you06 <you1474600@gmail.com>
2020-10-29 12:08:26 +08:00
127c3aa61d executor: support admin cleanup for clustered index table (#19522)
Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2020-08-28 11:46:52 +08:00
eff7837795 executor: support 'recover index' in clustered index tables (#19284)
* support 'recover index' in clustered index table

* ddl: add truncate to buildCommonHandleFromChunkRow

* executor: truncate the updated handle

* executor: set core.HandleCols in the initialization of RecoverIndexExec

* refine code

* remove unused code

* fix integration test

* fix integration test

* address comment

* early return when recovering clustered pk

* remove panic

Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2020-08-26 11:51:52 +08:00
761a961ba0 kv: refactor MemBuffer and reduce the memory usage (#18372) 2020-07-15 15:26:25 +08:00
3f6f36f742 *: refactor table.IterRecord and extract some methods (#18214)
* *: refactor table.IterRecord and extract some methods

* fix ci test

* fix ci test

Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2020-06-29 09:24:34 +08:00
6fa2badf38 util: move codec logic into tablecodec package (#18173)
* move codec logic into tablecodec package

* add key generation using physical table id

* remove using prefix

* change comment

* fix conclict

Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2020-06-24 17:43:10 +08:00
73c4673f30 *: support update/delete/insert ignore/duplicate update in single cluster index table (#17721) 2020-06-08 20:55:31 +08:00
b923b9e5de util/admin: support admin cleanup index on the partition table (#17203) 2020-05-26 13:13:40 +08:00
4078eb4ae5 util/admin: support admin recover index on the partition table (#17195) 2020-05-20 17:10:44 +08:00
51dabaabef *: refactor Handle in executor package (#16871) 2020-04-28 21:27:19 +08:00
6814f8c94b *: refactor Handle in table package (#16807) 2020-04-27 10:04:50 +08:00
af376db3dc *: refactor Handle in tablecodec and rowcodec (#16705)
Co-authored-by: pingcap-github-bot <sre-bot@pingcap.com>
2020-04-23 18:55:59 +08:00
55b3e1110c *: reduce the allocation caused by Datum.Copy (#15219) 2020-03-09 17:38:46 +08:00
05b691805a util: move ColumnsToProto from parser to util pkg (#14971) 2020-02-28 17:23:41 +08:00
a94cff903c *: refactor LockKeys API (#14020) 2019-12-11 15:05:59 +08:00
01a7d00053 executor: change pessimistic lock wait start for one statement (#13922) 2019-12-06 15:17:49 +08:00
a7d5b98306 *: Move StartTs from DAGRequest to Coprocessor.Request (#13823) 2019-12-03 17:13:12 +08:00
3a48a48630 *: remove the assertion proto (#13732)
The assertion proto was introduced to verify the data consistency, but I find
it's complex and hard to achieve that goal. Adding additional assertions just
makes more memory occupation, especially in the large transaction.
So it's better to remove it.
2019-11-26 22:58:49 +08:00
f12403ef08 executor: support select for update no wait (#12775) 2019-11-04 17:01:40 +08:00
4907685ed2 *: fix bug that the kill command doesn't work when the killed session is waiting for the pessimistic lock (#12852) 2019-10-24 17:26:12 +08:00
99a5432dce *: encode the returned data using the Chunk format in mocktikv (#12023) 2019-09-28 20:02:26 +08:00
036e7e207d *: support new 'log' format for trace (#11681) 2019-08-09 12:43:33 +08:00
c8ed781d51 executor: push-down LoadDataStmt in distsql (#11067)
moving function `statementContextToFlags` to `StatementContext.PushDownFlags()`

Co-authored-by: Lonng <heng@lonng.org>
Co-authored-by: Foreyes <foreyes_1002@163.com>
2019-07-14 17:58:49 +08:00
e1f2b3728d *: make assertion check more reasonable (#10424)
Make sure there are no "ASSERTION fail" logs in session and executor unit test
2019-07-04 16:20:38 +08:00
d244723a5e executor: remove unused structure RecordBatch (#10891) 2019-06-26 15:26:16 +08:00
c8d1ff7ca6 *: replace 'logutil.Logger(context.Background())' with 'logutil.BgLogger()' (#10866) 2019-06-21 19:13:31 +08:00
f6be085bc6 executor: tiny refactor the Executor interface (#10846)
Introduce a base() method to get the baseExecutor, so we don't need to add
method from baseExecutor to the Executor interface any more

Before:
```
type Executor interface {
	Open(context.Context) error
	Next(ctx context.Context, req *chunk.RecordBatch) error
	Close() error
	Schema() *expression.Schema

	retTypes() []*types.FieldType
	newFirstChunk() *chunk.Chunk
}
```

After:
```
type Executor interface {
        base() *baseExecutor
	Open(context.Context) error
	Next(ctx context.Context, req *chunk.RecordBatch) error
	Close() error
	Schema() *expression.Schema
}
```
2019-06-19 15:55:28 +08:00
373748adf7 *: support pessimistic transaction (experimental feature) (#10297) 2019-05-11 09:48:45 +08:00
e9653675dd *: remove errors.Trace in main handle path (#10033) 2019-04-04 14:27:15 +08:00
f738ba24ad executor: replace logger with zap logger (#9521) 2019-03-14 15:14:38 +08:00
3910a720df *: add assertion in kvproto to check data consistency (#9180) 2019-03-08 16:49:31 +08:00
18449d777a *: merge statement buffer when BatchGetValues (#9374) 2019-02-22 11:06:58 +08:00
00c4ff4fa9 *: refactor Executor.Next() to receive RecordBatch (#8994) 2019-01-14 15:04:36 +08:00
a7907ede7a *: remove fail field from TxnState (#8712)
Originally, `fail` is added to simplify error handling, avoiding large changes on
the Txn() interface API. But it turns out that `fail` becomes the root of many bugs.
So this commit remove the `fail` and make an API refactory.
2018-12-20 16:36:12 +08:00
4899ce5e92 ddl: add error check in ddlCtx.buildDescTableScan (#8726) 2018-12-18 14:47:23 +08:00
c137cada68 *: change golang.org/x/net/context to standard context (#8579) 2018-12-05 13:54:00 +08:00
3742a0d602 *: Txn() function signature refactor and remove ActivePendingTxn() (#8327)
* change Txn() function signature to Txn(active bool)
* ActivePendingTxn() is not used any more because Txn() does the work
* change executor builder getStartTS() uint64 to getStartTS() (uint64, error)
2018-11-16 11:10:39 +08:00
32b1dbd8d5 *: rename "github.com/pkg/errors" to "github.com/pingcap/errors" (#8136)
We import "github.com/pkg/errors" in the code, and actually put
the "github.com/pingcap/errors" there in the vendor path.
That's a dirty hack, and prevent the introduce of Go module.
2018-11-01 16:09:07 +08:00
89dda9d9a8 *: move parser to a separate repository (#8036) 2018-10-25 11:12:10 +08:00
05b37de16e *: use chunk grow for simple executor (#7540) 2018-09-27 09:07:51 +08:00
e79bd946ed *: change package name from plan to planner (#7760) 2018-09-25 11:16:39 +08:00
29441950a3 *: write system timezone into mysql.tidb in bootstrap stage. (#7638) 2018-09-14 22:15:00 +08:00
cb03f2bec1 move from juju/errors to pkg/errors (#7151) 2018-09-12 15:42:20 +08:00
7523566bc9 executor: CheckIndexRangeExec should set the types of index columns (#7376) 2018-08-14 13:33:43 +08:00
55d8eff758 executor: fix admin cleanup index for non-unique handles in a unique index (#7248)
* fix one handle to multi unique indices
2018-08-02 17:23:14 +08:00
7c18d24933 executor, store: fixed daylight saving time issue (#6823)
Thank you for working on TiDB! Please read TiDB's [CONTRIBUTING](https://github.com/pingcap/tidb/blob/master/CONTRIBUTING.md) document **BEFORE** filing this PR.

## What have you changed? (mandatory)

During coprocessor dag task,  it first uses timezone `name`, if non-empty, to get legitimate timezone variable. To achieve this, we need to push down such data into tikv which leads to change the logic of building pushdown request. The logic I mentioned mainly resides in `executor` package. 

I change `timeZoneOffset` to `zone` and add second return parameter `name string`.  The intentioned of doing this to adopt the convention of `time` package. 

For the same purpose, I change `GetTimeZone` to `Location`. As you can see, in `time` package, timezone was bind to `Location`. 


## What are the type of the changes (mandatory)?
- Bug fix (non-breaking change which fixes an issue)


## How has this PR been tested (mandatory)?
unit-test
integration-test will be added shortly
2018-07-16 18:15:19 +08:00
fbba541156 *: move basic functions and definitions to model package, to make constructing dag request more easier. (#6652) 2018-05-26 20:39:22 +08:00
5c2d21eab4 *: remove function "NewChunk" (#6524) 2018-05-14 13:43:19 +08:00
12dbd32854 *: rename NewRange to Range. (#6368) 2018-04-25 13:13:04 +08:00