Giter Club home page Giter Club logo

docs's Introduction

TiDB Documentation

Welcome to TiDB documentation!

This repository stores all the source files of TiDB Docs at the PingCAP website, while the pingcap/docs-cn repository stores all the source files of TiDB Documentation in Chinese.

If you find documentation issues, feel free to create an Issue to let us know or directly create a Pull Request to help fix or update it.

If you want to locally customize and output TiDB documentation in PDF format to meet the needs of specific scenarios, such as freely sorting or deleting certain contents in TiDB documentation, please refer to TiDB Documentation PDF Generation Tutorial.

Currently, the official documentation supports two languages:

You can use Google Translate to view the documentation in different languages. For example:

Documentation versions

Currently, we maintain the following versions of TiDB documentation in different branches:

Branch name TiDB docs version
master The latest development version
release-8.1 8.1 LTS (Long-Term Support)
release-8.0 8.0 Development Milestone Release
release-7.6 7.6 Development Milestone Release
release-7.5 7.5 LTS (Long-Term Support)
release-7.4 7.4 Development Milestone Release (Archived documentation, no longer updated)
release-7.3 7.3 Development Milestone Release (Archived documentation, no longer updated)
release-7.2 7.2 Development Milestone Release (Archived documentation, no longer updated)
release-7.1 7.1 LTS (Long-Term Support) version
release-7.0 7.0 Development Milestone Release (Archived documentation, no longer updated)
release-6.6 6.6 Development Milestone Release (Archived documentation, no longer updated)
release-6.5 6.5 LTS (Long-Term Support) version
release-6.4 6.4 Development Milestone Release (Archived documentation, no longer updated)
release-6.3 6.3 Development Milestone Release (Archived documentation, no longer updated)
release-6.2 6.2 Development Milestone Release (Archived documentation, no longer updated)
release-6.1 6.1 LTS (Long-Term Support) version
release-6.0 6.0 Development Milestone Release (Archived documentation, no longer updated)
release-5.4 5.4 stable version
release-5.3 5.3 stable version
release-5.2 5.2 stable version
release-5.1 5.1 stable version
release-5.0 5.0 stable version (Archived documentation, no longer updated)
release-4.0 4.0 stable version (Archived documentation, no longer updated)
release-3.1 3.1 stable version (Archived documentation, no longer updated)
release-3.0 3.0 stable version (Archived documentation, no longer updated)
release-2.1 2.1 stable version (Archived documentation, no longer updated)

Contributing

contribution-map

See TiDB Documentation Contributing Guide to become a contributor! 🤓

License

All documentation starting from TiDB v7.0 is available under the terms of CC BY-SA 3.0.

docs's People

Contributors

caitinchen avatar charlotteiu avatar dcalvin avatar dveeden avatar en-jin19 avatar hfxsd avatar icemap avatar ireneontheway avatar joyinqin avatar junlan-zhang avatar lilin90 avatar liuxiaozhen12 avatar morgo avatar oreoxmt avatar qiancai avatar queenyjin avatar ran-huang avatar shenli avatar shichun-0415 avatar siddontang avatar tabokie avatar ti-chi-bot avatar ti-srebot avatar tiancaiamao avatar tomshawn avatar toutdesuite avatar xuechunl avatar yahonda avatar yikeke avatar yinixu9506 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docs's Issues

error installing tidb with ansible on task: machine_benchmark

when i excute the command: ansible-playbook bootstrap.yml to install tidb, i made a mistake:

TASK [machine_benchmark : set fio disk_mix_write_lat facts] ****************************************************************************************************************
fatal: [192.168.19.13]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: list object has no element 1\n\nThe error appears to have been in '/software/tidb-ansible/roles/machine_benchmark/tasks/main.yml': line 56, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: set fio disk_mix_write_lat facts\n  ^ here\n"}

# The Default configuration:
benchmark_size: 10G

So I did a manual test:
1`

./fio -ioengine=libaio -bs=32k -direct=1 -thread -rw=randrw -percentage_random=100,0 -size=10G -filename=fio_randr_write_lat_test.txt -name='PingCAP' -iodepth=4 -runtime=60 | grep -w 'lat (usec)' | grep avg | awk -F'avg=' '{print $2}' | awk -F',' '{print $1}'
8682.70

2、

/fio -ioengine=libaio -bs=32k -direct=1 -thread -rw=randrw -percentage_random=100,0 -size=10000M -filename=fio_randr_write_lat_test.txt -name='PingCAP' -iodepth=4 -runtime=60 | grep -w 'lat (usec)' | grep avg | awk -F'avg=' '{print $2}' | awk -F',' '{print $1}'
11420.83
8777.24

3、

./fio -ioengine=libaio -bs=32k -direct=1 -thread -rw=randrw -percentage_random=100,0 -size=1G -filename=fio_randr_write_lat_test.txt -name='PingCAP' -iodepth=4 -runtime=60 | grep -w 'lat (usec)' | grep avg | awk -F'avg=' '{print $2}' | awk -F',' '{print $1}'
10060.48
8055.45

for the test detals:**
1、

[tidb@localhost deploy]$ ./fio -ioengine=libaio -bs=32k -direct=1 -thread -rw=randrw -percentage_random=100,0 -size=10G -filename=fio_randr_write_lat_test.txt -name='PingCAP' -iodepth=4 -runtime=60 
PingCAP: (g=0): rw=randrw, bs=32K-32K/32K-32K/32K-32K, ioengine=libaio, iodepth=4
fio-2.16-4-g3544
Starting 1 thread
Jobs: 1 (f=1): [m(1)] [100.0% done] [6176KB/6912KB/0KB /s] [193/216/0 iops] [eta 00m:00s]
PingCAP: (groupid=0, jobs=1): err= 0: pid=4045: Thu Jun 14 17:45:45 2018
  read : io=380416KB, bw=6338.2KB/s, iops=198, runt= 60012msec
    slat (usec): min=15, max=106, avg=32.63, stdev= 8.42
    clat (msec): min=1, max=207, avg=11.35, stdev= 7.58
     lat (msec): min=1, max=207, avg=11.39, stdev= 7.58
    clat percentiles (msec):
     |  1.00th=[    3],  5.00th=[    4], 10.00th=[    5], 20.00th=[    7],
     | 30.00th=[    8], 40.00th=[    9], 50.00th=[   10], 60.00th=[   11],
     | 70.00th=[   13], 80.00th=[   16], 90.00th=[   20], 95.00th=[   25],
     | 99.00th=[   39], 99.50th=[   44], 99.90th=[   61], 99.95th=[   67],
     | 99.99th=[  200]
  write: io=382208KB, bw=6368.9KB/s, iops=199, runt= 60012msec
    slat (usec): min=21, max=102, avg=36.76, stdev= 8.49
    clat (usec): min=460, max=212520, avg=8717.90, stdev=5664.26
     lat (usec): min=496, max=212544, avg=8754.66, stdev=5664.26
    clat percentiles (usec):
     |  1.00th=[ 1048],  5.00th=[ 2256], 10.00th=[ 3312], 20.00th=[ 4960],
     | 30.00th=[ 6112], 40.00th=[ 6368], 50.00th=[ 7136], 60.00th=[ 8640],
     | 70.00th=[10560], 80.00th=[12224], 90.00th=[15424], 95.00th=[18304],
     | 99.00th=[24960], 99.50th=[28800], 99.90th=[36096], 99.95th=[41216],
     | 99.99th=[205824]
    lat (usec) : 500=0.03%, 750=0.19%, 1000=0.26%
    lat (msec) : 2=1.50%, 4=8.08%, 10=50.47%, 20=33.14%, 50=6.19%
    lat (msec) : 100=0.13%, 250=0.02%
  cpu          : usr=0.56%, sys=1.89%, ctx=22559, majf=0, minf=11
  IO depths    : 1=0.1%, 2=0.1%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     issued    : total=r=11888/w=11944/d=0, short=r=0/w=0/d=0, drop=r=0/w=0/d=0
     latency   : target=0, window=0, percentile=100.00%, depth=4

Run status group 0 (all jobs):
   READ: io=380416KB, aggrb=6338KB/s, minb=6338KB/s, maxb=6338KB/s, mint=60012msec, maxt=60012msec
  WRITE: io=382208KB, aggrb=6368KB/s, minb=6368KB/s, maxb=6368KB/s, mint=60012msec, maxt=60012msec

Disk stats (read/write):
    dm-2: ios=11874/11929, merge=0/0, ticks=134531/103806, in_queue=238355, util=99.89%, aggrios=11888/11948, aggrmerge=0/0, aggrticks=134723/103921, aggrin_queue=238617, aggrutil=99.86%
  sda: ios=11888/11948, merge=0/0, ticks=134723/103921, in_queue=238617, util=99.86%

2、

[tidb@localhost deploy]$ ./fio -ioengine=libaio -bs=32k -direct=1 -thread -rw=randrw -percentage_random=100,0 -size=10000M -filename=fio_randr_write_lat_test.txt -name='PingCAP' -iodepth=4 -runtime=60 
PingCAP: (g=0): rw=randrw, bs=32K-32K/32K-32K/32K-32K, ioengine=libaio, iodepth=4
fio-2.16-4-g3544
Starting 1 thread
PingCAP: Laying out IO file(s) (1 file(s) / 10000MB)
Jobs: 1 (f=1): [m(1)] [100.0% done] [8032KB/8352KB/0KB /s] [251/261/0 iops] [eta 00m:00s]
PingCAP: (groupid=0, jobs=1): err= 0: pid=4148: Thu Jun 14 17:53:12 2018
  read : io=489664KB, bw=8160.4KB/s, iops=255, runt= 60005msec
    slat (usec): min=16, max=149, avg=35.53, stdev= 7.93
    clat (usec): min=310, max=70993, avg=8617.21, stdev=5490.06
     lat (usec): min=349, max=71027, avg=8652.73, stdev=5490.01
    clat percentiles (usec):
     |  1.00th=[ 2064],  5.00th=[ 2800], 10.00th=[ 3440], 20.00th=[ 4576],
     | 30.00th=[ 5536], 40.00th=[ 6368], 50.00th=[ 7264], 60.00th=[ 8256],
     | 70.00th=[ 9664], 80.00th=[11712], 90.00th=[15040], 95.00th=[19072],
     | 99.00th=[28544], 99.50th=[33536], 99.90th=[45312], 99.95th=[49920],
     | 99.99th=[70144]
  write: io=490976KB, bw=8182.3KB/s, iops=255, runt= 60005msec
    slat (usec): min=20, max=138, avg=39.34, stdev= 7.68
    clat (usec): min=414, max=65713, avg=6963.41, stdev=4226.16
     lat (usec): min=455, max=65745, avg=7002.74, stdev=4226.12
    clat percentiles (usec):
     |  1.00th=[  740],  5.00th=[ 1672], 10.00th=[ 2448], 20.00th=[ 3664],
     | 30.00th=[ 4768], 40.00th=[ 5728], 50.00th=[ 6176], 60.00th=[ 6496],
     | 70.00th=[ 7648], 80.00th=[ 9920], 90.00th=[12352], 95.00th=[15040],
     | 99.00th=[20608], 99.50th=[24192], 99.90th=[30336], 99.95th=[34048],
     | 99.99th=[42240]
    lat (usec) : 500=0.11%, 750=0.41%, 1000=0.45%
    lat (msec) : 2=2.90%, 4=14.74%, 10=57.47%, 20=21.32%, 50=2.57%
    lat (msec) : 100=0.03%
  cpu          : usr=0.71%, sys=2.61%, ctx=29794, majf=0, minf=11
  IO depths    : 1=0.1%, 2=0.1%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     issued    : total=r=15302/w=15343/d=0, short=r=0/w=0/d=0, drop=r=0/w=0/d=0
     latency   : target=0, window=0, percentile=100.00%, depth=4

Run status group 0 (all jobs):
   READ: io=489664KB, aggrb=8160KB/s, minb=8160KB/s, maxb=8160KB/s, mint=60005msec, maxt=60005msec
  WRITE: io=490976KB, aggrb=8182KB/s, minb=8182KB/s, maxb=8182KB/s, mint=60005msec, maxt=60005msec

Disk stats (read/write):
    dm-2: ios=15273/15320, merge=0/0, ticks=131245/106448, in_queue=237715, util=99.88%, aggrios=15302/15354, aggrmerge=0/1, aggrticks=131457/106704, aggrin_queue=238142, aggrutil=99.86%
  sda: ios=15302/15354, merge=0/1, ticks=131457/106704, in_queue=238142, util=99.86%

summary:
in my solutions, when benchmark_size: 10G, i I got only one value
when benchmark_size: 1G or benchmark_size: 10000M or benchmark_size: 10M , i got two values,
so, If I use the default value, the installation process will be wrong and interrupted。
Please test it again, thank you!

build tikv failed with command "make", but succeeded with "make static_release"

It seems ROCKSDB_SYS_STATIC=1 is always needed when build.

// tikv/Makefile
 31 release:
 32     cargo build --release --features "${ENABLE_FEATURES}"
 33     @mkdir -p ${BIN_PATH}
 34     cp -f ${CARGO_TARGET_DIR}/release/tikv-ctl ${CARGO_TARGET_DIR}/release/tikv-server ${BIN_PATH}/
 35 
 36 static_release:
 37     ROCKSDB_SYS_STATIC=1 ROCKSDB_SYS_PORTABLE=1 make release

make static_release (succeeded)

suzhou@suzhou-N55SL:~/zhousu/tidb/docs/scripts/deps/tikv$ make static_release
ROCKSDB_SYS_STATIC=1 ROCKSDB_SYS_PORTABLE=1 make release
make[1]: Entering directory '/home/suzhou/zhousu/tidb/docs/scripts/deps/tikv'
cargo build --release --features "default static-link portable"
   Compiling unicase v1.4.0
   Compiling thread-id v2.0.0
   Compiling cookie v0.2.5
   Compiling tikv v0.0.1 (file:///home/suzhou/zhousu/tidb/docs/scripts/deps/tikv)
   Compiling librocksdb_sys v0.1.0 (https://github.com/ngaut/rust-rocksdb.git#e2a50c47)
   Compiling thread_local v0.2.7
   Compiling backtrace v0.2.3
   Compiling regex v0.1.70
   Compiling net2 v0.2.23
   Compiling miow v0.1.2
   Compiling num v0.1.32
   Compiling chrono v0.2.25
   Compiling hyper v0.9.10
   Compiling mio v0.5.0 (https://github.com/carllerche/mio.git#7d4778f2)
   Compiling clap v2.14.0
   Compiling protobuf v1.0.23
   Compiling prometheus v0.2.8 (https://github.com/pingcap/rust-prometheus.git#b6da17ea)
   Compiling tipb v0.0.1 (https://github.com/pingcap/tipb.git#378c9b0c)
   Compiling kvproto v0.0.1 (https://github.com/pingcap/kvproto#ed926a15)
   Compiling rocksdb v0.3.0 (https://github.com/ngaut/rust-rocksdb.git#e2a50c47)
    Finished release [optimized + debuginfo] target(s) in 1217.68 secs
cp -f /home/suzhou/zhousu/tidb/docs/scripts/deps/tikv/target/release/tikv-ctl /home/suzhou/zhousu/tidb/docs/scripts/deps/tikv/target/release/tikv-server /home/suzhou/zhousu/tidb/docs/scripts/deps/tikv/bin/
make[1]: Leaving directory '/home/suzhou/zhousu/tidb/docs/scripts/deps/tikv'

make (Failed)

suzhou@suzhou-N55SL:~/zhousu/tidb/docs/scripts/deps/tikv$ make release
cargo build --release --features "default"
   Compiling librocksdb_sys v0.1.0 (https://github.com/ngaut/rust-rocksdb.git#e2a50c47)
   Compiling tikv v0.0.1 (file:///home/suzhou/zhousu/tidb/docs/scripts/deps/tikv)
Build failed, waiting for other jobs to finish...
error: failed to run custom build command for `librocksdb_sys v0.1.0 (https://github.com/ngaut/rust-rocksdb.git#e2a50c47)`
process didn't exit successfully: `/home/suzhou/zhousu/tidb/docs/scripts/deps/tikv/target/release/build/librocksdb_sys-10e3c64f88ec5fe0/build-script-build` (exit code: 101)
--- stdout
TARGET = Some("x86_64-unknown-linux-gnu")
OPT_LEVEL = Some("3")
PROFILE = Some("release")
TARGET = Some("x86_64-unknown-linux-gnu")
debug=false opt-level=3
HOST = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CXX_x86_64-unknown-linux-gnu = None
CXX_x86_64_unknown_linux_gnu = None
HOST_CXX = None
CXX = None
HOST = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CXXFLAGS_x86_64-unknown-linux-gnu = None
CXXFLAGS_x86_64_unknown_linux_gnu = None
HOST_CXXFLAGS = None
CXXFLAGS = None
running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-m64" "-fPIC" "-std=c++11" "-fPIC" "-O2" "-o" "/home/suzhou/zhousu/tidb/docs/scripts/deps/tikv/target/release/build/librocksdb_sys-9b6727fa259b776b/out/crocksdb/c.o" "-c" "crocksdb/c.cc"
cargo:warning=crocksdb/c.cc:52:16: error: ‘rocksdb::IngestExternalFileOptions’ has not been declared
cargo:warning= using rocksdb::IngestExternalFileOptions;
cargo:warning=                ^
cargo:warning=crocksdb/c.cc:116:48: error: ‘IngestExternalFileOptions’ does not name a type
cargo:warning= struct crocksdb_ingestexternalfileoptions_t  { IngestExternalFileOptions rep; };
cargo:warning=                                                ^
cargo:warning=crocksdb/c.cc: In function ‘void crocksdb_iter_seek_for_prev(crocksdb_iterator_t*, const char*, size_t)’:
cargo:warning=crocksdb/c.cc:1054:14: error: ‘class rocksdb::Iterator’ has no member named ‘SeekForPrev’
cargo:warning=   iter->rep->SeekForPrev(Slice(k, klen));
cargo:warning=              ^
cargo:warning=crocksdb/c.cc: In function ‘void crocksdb_ingestexternalfileoptions_set_move_files(crocksdb_ingestexternalfileoptions_t*, unsigned char)’:
cargo:warning=crocksdb/c.cc:2388:8: error: ‘crocksdb_ingestexternalfileoptions_t {aka struct crocksdb_ingestexternalfileoptions_t}’ has no member named ‘rep’
cargo:warning=   opt->rep.move_files = move_files;
cargo:warning=        ^
cargo:warning=crocksdb/c.cc: In function ‘void crocksdb_ingestexternalfileoptions_set_snapshot_consistency(crocksdb_ingestexternalfileoptions_t*, unsigned char)’:
cargo:warning=crocksdb/c.cc:2394:8: error: ‘crocksdb_ingestexternalfileoptions_t {aka struct crocksdb_ingestexternalfileoptions_t}’ has no member named ‘rep’
cargo:warning=   opt->rep.snapshot_consistency = snapshot_consistency;
cargo:warning=        ^
cargo:warning=crocksdb/c.cc: In function ‘void crocksdb_ingestexternalfileoptions_set_allow_global_seqno(crocksdb_ingestexternalfileoptions_t*, unsigned char)’:
cargo:warning=crocksdb/c.cc:2400:8: error: ‘crocksdb_ingestexternalfileoptions_t {aka struct crocksdb_ingestexternalfileoptions_t}’ has no member named ‘rep’
cargo:warning=   opt->rep.allow_global_seqno = allow_global_seqno;
cargo:warning=        ^
cargo:warning=crocksdb/c.cc: In function ‘void crocksdb_ingestexternalfileoptions_set_allow_blocking_flush(crocksdb_ingestexternalfileoptions_t*, unsigned char)’:
cargo:warning=crocksdb/c.cc:2406:8: error: ‘crocksdb_ingestexternalfileoptions_t {aka struct crocksdb_ingestexternalfileoptions_t}’ has no member named ‘rep’
cargo:warning=   opt->rep.allow_blocking_flush = allow_blocking_flush;
cargo:warning=        ^
cargo:warning=crocksdb/c.cc: In function ‘void crocksdb_ingest_external_file(crocksdb_t*, const char* const*, size_t, const crocksdb_ingestexternalfileoptions_t*, char**)’:
cargo:warning=crocksdb/c.cc:2421:30: error: ‘class rocksdb::DB’ has no member named ‘IngestExternalFile’
cargo:warning=   SaveError(errptr, db->rep->IngestExternalFile(files, opt->rep));
cargo:warning=                              ^
cargo:warning=crocksdb/c.cc:2421:61: error: ‘const crocksdb_ingestexternalfileoptions_t {aka const struct crocksdb_ingestexternalfileoptions_t}’ has no member named ‘rep’
cargo:warning=   SaveError(errptr, db->rep->IngestExternalFile(files, opt->rep));
cargo:warning=                                                             ^
cargo:warning=crocksdb/c.cc: In function ‘void crocksdb_ingest_external_file_cf(crocksdb_t*, crocksdb_column_family_handle_t*, const char* const*, size_t, const crocksdb_ingestexternalfileoptions_t*, char**)’:
cargo:warning=crocksdb/c.cc:2432:30: error: ‘class rocksdb::DB’ has no member named ‘IngestExternalFile’
cargo:warning=   SaveError(errptr, db->rep->IngestExternalFile(handle->rep, files, opt->rep));
cargo:warning=                              ^
cargo:warning=crocksdb/c.cc:2432:74: error: ‘const crocksdb_ingestexternalfileoptions_t {aka const struct crocksdb_ingestexternalfileoptions_t}’ has no member named ‘rep’
cargo:warning=   SaveError(errptr, db->rep->IngestExternalFile(handle->rep, files, opt->rep));
cargo:warning=                                                                          ^
ExitStatus(ExitStatus(256))


command did not execute successfully, got: exit code: 1



--- stderr
thread 'main' panicked at 'explicit panic', /home/suzhou/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.35/src/lib.rs:897
note: Run with `RUST_BACKTRACE=1` for a backtrace.

Makefile:32: recipe for target 'release' failed
make: *** [release] Error 101

At-rest Encryption

I'm sorry if this has already been addressed, but I don't see it mentioned in the documentation.

Does TiDB support at-rest encryption, where the data in the storage system is encrypted so that hackers that gain access to the server cannot simply read the data in the files?

This is an important feature which other databases such as MySQL 5.7 and Mongo 3.2 have introduced. The European GDPR laws coming into force this year don't state that encryption at-rest is required, but it is strongly implied that if a hacker were to gain access to a server hosting data, and the data is not encrypted, then the server-owner must make the breach public.

The Word Stopped

I followed https://github.com/pingcap/docs/blob/master/op-guide/docker.md to start all required services, and it succeed.

But when I tried command:

docker stop pd5
docker stop pd4
docker start pd4
docker start pd5

All services are DOWN.(pd, tikv and tidb)

And It(pd4/pd5) can not started again.

logs 2016/08/06 23:52:36 main.go:45: [error] create pd server err etcdserver: Peer URLs already exists

It seems that when pd4/pd5 down, It not de-register.

Any helpful log need I provided?
Am I missed something?

Differences in defaults between TiDB and MySQL 5.7

Is it possible to create a manual page (or alternatively append to this manual page) differences in defaults between TiDB and MySQL? My short list:

  • TiDB defaults to utf8 (MySQL 5.7 is latin1 - this changes in 8.0 to utf8).
  • TiDB defaults and only supports lower_case_table_names=2.
  • TiDB's default collation is binary.

Diagramming tool suggestion

Hi There
I noticed that the TiDB's architecture diagram are using google's diagramming tool.
Is it possible that TiDB diagrammig tool can be switched over to open-source Dia tool?
Doing so will allow others to download the .dia source and modify/enhance/reuse diagrams easily.

Config to always use tidb_snapshot

I'm looking to use TiDB/TiKV as a mirror for data with an upstream source of truth for sequence/time. I'd like to use the tidb_snapshot system variable to impose a time on inserts, and to perform snapshot reads.

The documentation here https://github.com/pingcap/docs/blame/master/op-guide/history-read.md#L25 implies that the PD clock may override tidb_snapshot if there is a large difference. I would prefer to be able to turn that off with some configuration if possible, so that the client can impose snapshot times.

Is there some settable config that exists, or could it be added, to accommodate this need?

Thank you!

Could not compile `tikv`.

use setup script :

Compiling rocksdb v0.3.0 (https://github.com/ngaut/rust-rocksdb.git#4c8e2192)
src/lib.rs:15:1: 15:18 error: #[feature] may not be used on the stable release channel [E0554]
src/lib.rs:15 #![feature(test)]
^~~~~~~~~~~~~~~~~
src/lib.rs:16:1: 16:34 error: #[feature] may not be used on the stable release channel [E0554]
src/lib.rs:16 #![feature(optin_builtin_traits)]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lib.rs:17:1: 17:44 error: #[feature] may not be used on the stable release channel [E0554]
src/lib.rs:17 #![feature(btree_range, collections_bound)]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lib.rs:18:1: 18:19 error: #[feature] may not be used on the stable release channel [E0554]
src/lib.rs:18 #![feature(fnbox)]
^~~~~~~~~~~~~~~~~~
src/lib.rs:19:1: 19:19 error: #[feature] may not be used on the stable release channel [E0554]
src/lib.rs:19 #![feature(alloc)]
^~~~~~~~~~~~~~~~~~
src/lib.rs:20:1: 20:20 error: #[feature] may not be used on the stable release channel [E0554]
src/lib.rs:20 #![feature(plugin)]
^~~~~~~~~~~~~~~~~~~
src/lib.rs:21:1: 21:28 error: #[feature] may not be used on the stable release channel [E0554]
src/lib.rs:21 #![feature(slice_patterns)]
^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lib.rs:22:1: 22:24 error: #[feature] may not be used on the stable release channel [E0554]
src/lib.rs:22 #![feature(box_syntax)]
^~~~~~~~~~~~~~~~~~~~~~~
src/lib.rs:23:1: 23:22 error: #[feature] may not be used on the stable release channel [E0554]
src/lib.rs:23 #![feature(const_fn)]
^~~~~~~~~~~~~~~~~~~~~
error: aborting due to 9 previous errors
error: Could not compile tikv.

op-guide: Add tabs style to Kubernetes

On the kubernetes deploy page, is it possible to have the platforms appear as tabs? (similar to macOS and Linux on this page).

The goal is that in future other k8s platforms will be introduced (eks etc.) It should also be possible to directly link to the tab being selected.

(In future maybe the ansible online/offline guide could be modified to one page with tabs too.)

How to recover root user's privilege after some improper operation by mistake?

The misuse removed the user root@'%', and the user root@'127.0.0.1' was created without giving any permission.
After tidb is restarted with skip-grant-table=true, the root user still does not have any permissions.

./tidb-server -V
Release Version: v2.0.0
Git Commit Hash: 637e130e6a9ba2e54e158131c0466233db39a60e
Git Commit Branch: release-2.0
UTC Build Time: 2018-04-27 11:43:00
GoVersion: go version go1.10 linux/amd64
TiKV Min Version: 2.0.0-rc.4.1

Document supported SQL syntax

While the roadmap contains a list of things the SQL layer supports, it is very brief.

For example, it is unclear to what extent simple subqueries are supported. It would be nice if there was a dedicated document documenting all the supported SQL constructs and syntax.

Does TiKV servers need NTP service on?

My understanding is that PD uses etcd to act as timestamp oracle. Therefore, you need NTP on all pd servers to ensure they are not too far off. But I don't see any reference to NTP in TiKV, does that mean we can actually do without it on TiKV servers?

Arm support

Hello are there arm docker images or binaries for pd, tikv and tidb. Atleast for entry or test environment for raspberry pi community

Authentication failure

changed: [localhost]
to retry, use: --limit @/usr/local/tidb-ansible-master/retry_files/bootstrap.retry

PLAY RECAP ******************************************************************************************************************************************************************************************************************************
192.168.1.161 : ok=6 changed=0 unreachable=1 failed=0
192.168.1.164 : ok=6 changed=0 unreachable=1 failed=0
192.168.1.168 : ok=34 changed=1 unreachable=0 failed=0
192.168.1.169 : ok=6 changed=0 unreachable=1 failed=0
192.168.1.171 : ok=6 changed=0 unreachable=1 failed=0
192.168.1.173 : ok=6 changed=0 unreachable=1 failed=0
localhost : ok=2 changed=1 unreachable=0 failed=0

[192.168.1.161]: Ansible UNREACHABLE! => playbook: bootstrap.yml; TASK: bootstrap : gather facts; message: {"changed": false, "msg": "Authentication failure.", "unreachable": true}

[192.168.1.171]: Ansible UNREACHABLE! => playbook: bootstrap.yml; TASK: bootstrap : gather facts; message: {"changed": false, "msg": "Authentication failure.", "unreachable": true}

[192.168.1.169]: Ansible UNREACHABLE! => playbook: bootstrap.yml; TASK: bootstrap : gather facts; message: {"changed": false, "msg": "Authentication failure.", "unreachable": true}

[192.168.1.173]: Ansible UNREACHABLE! => playbook: bootstrap.yml; TASK: bootstrap : gather facts; message: {"changed": false, "msg": "Authentication failure.", "unreachable": true}

[192.168.1.164]: Ansible UNREACHABLE! => playbook: bootstrap.yml; TASK: bootstrap : gather facts; message: {"changed": false, "msg": "Authentication failure.", "unreachable": true}

请问这个,说我认证失败,这个怎么处理?

create cluster on aliyun issue

Hi All,

When i create cluster on Aliyun, i got the error as below:

2016-08-11 19:06:47,152 tikv-server.rs:117 - INFO - rocksdb.write-buffer-size, use default Some(67108864)
2016-08-11 19:06:47,152 tikv-server.rs:117 - INFO - rocksdb.max-write-buffer-number, use default Some(5)
2016-08-11 19:06:47,152 tikv-server.rs:117 - INFO - rocksdb.min-write-buffer-number-to-merge, use default Some(1)
2016-08-11 19:06:47,152 tikv-server.rs:117 - INFO - rocksdb.max-background-compactions, use default Some(4)
2016-08-11 19:06:47,152 tikv-server.rs:117 - INFO - rocksdb.max-bytes-for-level-base, use default Some(67108864)
2016-08-11 19:06:47,152 tikv-server.rs:117 - INFO - rocksdb.target-file-size-base, use default Some(16777216)
2016-08-11 19:06:47,152 tikv-server.rs:117 - INFO - rocksdb.level0-slowdown-writes-trigger, use default Some(12)
2016-08-11 19:06:47,152 tikv-server.rs:117 - INFO - rocksdb.level0-stop-writes-trigger, use default Some(16)
2016-08-11 19:06:47,979 client.rs:115 - INFO - get pd leader 127.0.0.1:1234
2016-08-11 19:06:47,980 client.rs:128 - WARN - connect pd failed Other(RelativeUrlWithoutBase)
2016-08-11 19:06:48,090 client.rs:115 - INFO - get pd leader 127.0.0.1:1234
2016-08-11 19:06:48,090 client.rs:128 - WARN - connect pd failed Other(RelativeUrlWithoutBase)
2016-08-11 19:06:48,199 client.rs:115 - INFO - get pd leader 127.0.0.1:1234
2016-08-11 19:06:48,199 client.rs:128 - WARN - connect pd failed Other(RelativeUrlWithoutBase)

Below is my configuration
i have two nodes A and B

Firstly i launch PD-Server on A and B using command as below:

A:
./pd-server --cluster-id=1
--name=pd1
--data-dir=pd1
--addr="0.0.0.0:1234"
--advertise-addr="A.net:1234"
--client-urls="http://0.0.0.0:2379"
--advertise-client-urls="http://A.net:2379"
--peer-urls="http://0.0.0.0:2380"
--advertise-peer-urls="http://A.net:2380"
--initial-cluster="pd1=http://A.net:2380,pd2=http://B.net:2380"

B:
./pd-server --cluster-id=1
--name=pd2
--data-dir=pd2
--addr="0.0.0.0:1234"
--advertise-addr="B.net:1234"
--client-urls="http://0.0.0.0:2379"
--advertise-client-urls="http://B:2379"
--peer-urls="http://0.0.0.0:2380"
--advertise-peer-urls="http://B:2380"
--initial-cluster="pd1=http://A.net:2380,pd2=http://B.net:2380"

Then launch tiki-server on A
./tikv-server -S raftkv -I 1 --pd A.net:2379,B.net:2379 --addr 127.0.0.1:20160 --advertise-addr A.net:20160 -s tikv1

And i got the error log as below:

2016-08-11 19:20:24,495 tikv-server.rs:117 - INFO - rocksdb.max-bytes-for-level-base, use default Some(67108864)
2016-08-11 19:20:24,495 tikv-server.rs:117 - INFO - rocksdb.target-file-size-base, use default Some(16777216)
2016-08-11 19:20:24,495 tikv-server.rs:117 - INFO - rocksdb.level0-slowdown-writes-trigger, use default Some(12)
2016-08-11 19:20:24,495 tikv-server.rs:117 - INFO - rocksdb.level0-stop-writes-trigger, use default Some(16)
2016-08-11 19:20:24,564 client.rs:115 - INFO - get pd leader A.net:1234
2016-08-11 19:20:24,564 client.rs:128 - WARN - connect pd failed Other(RelativeUrlWithoutBase)
2016-08-11 19:20:24,676 client.rs:115 - INFO - get pd leader A.net:1234
2016-08-11 19:20:24,677 client.rs:128 - WARN - connect pd failed Other(RelativeUrlWithoutBase)
2016-08-11 19:20:24,779 client.rs:115 - INFO - get pd leader A.net:1234

docker compose fails to start

Docker compose fails to start all the container successfully

pd1_1    | 2017/11/14 19:51:21.933 log.go:85: [info] raft: [47149ed249f68e2b is starting a new election at term 1]
pd1_1    | 2017/11/14 19:51:21.933 log.go:85: [info] raft: [47149ed249f68e2b became candidate at term 2]
pd1_1    | 2017/11/14 19:51:21.933 log.go:85: [info] raft: [47149ed249f68e2b received MsgVoteResp from 47149ed249f68e2b at term 2]
pd1_1    | 2017/11/14 19:51:21.933 log.go:85: [info] raft: [47149ed249f68e2b [logterm: 1, index: 3] sent MsgVote request to 545874f77ee42365 at term 2]
pd1_1    | 2017/11/14 19:51:21.933 log.go:85: [info] raft: [47149ed249f68e2b [logterm: 1, index: 3] sent MsgVote request to ac1a8c4dd9d0efa4 at term 2]
pd3_1    | 2017/11/14 19:51:21.934 log.go:85: [info] raft: [ac1a8c4dd9d0efa4 [term: 1] received a MsgVote message with higher term from 47149ed249f68e2b [term: 2]]
pd3_1    | 2017/11/14 19:51:21.934 log.go:85: [info] raft: [ac1a8c4dd9d0efa4 became follower at term 2]
pd3_1    | 2017/11/14 19:51:21.934 log.go:85: [info] raft: [ac1a8c4dd9d0efa4 [logterm: 1, index: 3, vote: 0] cast MsgVote for 47149ed249f68e2b [logterm: 1, index: 3] at term 2]
pd2_1    | 2017/11/14 19:51:21.934 log.go:85: [info] raft: [545874f77ee42365 [term: 1] received a MsgVote message with higher term from 47149ed249f68e2b [term: 2]]
pd2_1    | 2017/11/14 19:51:21.934 log.go:85: [info] raft: [545874f77ee42365 became follower at term 2]
pd2_1    | 2017/11/14 19:51:21.934 log.go:85: [info] raft: [545874f77ee42365 [logterm: 1, index: 3, vote: 0] cast MsgVote for 47149ed249f68e2b [logterm: 1, index: 3] at term 2]
pd1_1    | 2017/11/14 19:51:21.935 log.go:85: [info] raft: [47149ed249f68e2b received MsgVoteResp from 545874f77ee42365 at term 2]
pd1_1    | 2017/11/14 19:51:21.935 log.go:85: [info] raft: [47149ed249f68e2b [quorum:2] has received 2 MsgVoteResp votes and 0 vote rejections]
pd1_1    | 2017/11/14 19:51:21.935 log.go:85: [info] raft: [47149ed249f68e2b became leader at term 2]
pd1_1    | 2017/11/14 19:51:21.935 log.go:85: [info] raft: [raft.node: 47149ed249f68e2b elected leader 47149ed249f68e2b at term 2]
pd3_1    | 2017/11/14 19:51:21.936 log.go:85: [info] raft: [raft.node: ac1a8c4dd9d0efa4 elected leader 47149ed249f68e2b at term 2]
pd2_1    | 2017/11/14 19:51:21.936 log.go:85: [info] raft: [raft.node: 545874f77ee42365 elected leader 47149ed249f68e2b at term 2]
pd1_1    | 2017/11/14 19:51:21.947 log.go:85: [info] etcdserver: [published {Name:pd1 ClientURLs:[http://pd1:2379]} to cluster 94b18d0610260deb]
pd1_1    | 2017/11/14 19:51:21.947 log.go:85: [info] embed: [ready to serve client requests]
pd1_1    | 2017/11/14 19:51:21.948 log.go:83: [info] embed: [serving insecure client requests on [::]:2379, this is strongly discouraged!]
pd2_1    | 2017/11/14 19:51:21.948 log.go:85: [info] etcdserver: [published {Name:pd2 ClientURLs:[http://pd2:2379]} to cluster 94b18d0610260deb]
pd2_1    | 2017/11/14 19:51:21.948 log.go:85: [info] embed: [ready to serve client requests]
pd2_1    | 2017/11/14 19:51:21.948 log.go:83: [info] embed: [serving insecure client requests on [::]:2379, this is strongly discouraged!]
pd3_1    | 2017/11/14 19:51:21.949 log.go:85: [info] etcdserver: [published {Name:pd3 ClientURLs:[http://pd3:2379]} to cluster 94b18d0610260deb]
pd3_1    | 2017/11/14 19:51:21.949 log.go:85: [info] embed: [ready to serve client requests]
pd2_1    | 2017/11/14 19:51:21.950 etcdutil.go:125: [warning] check etcd http://pd2:2379 status, resp: &{cluster_id:10714500045671370219 member_id:6077736303471108965 revision:1 raft_term:2  3.2.6 24576 5121893302248312363 7 2}, err: <nil>, cost: 1.874066638s
pd3_1    | 2017/11/14 19:51:21.949 log.go:83: [info] embed: [serving insecure client requests on [::]:2379, this is strongly discouraged!]
tidb_1   | 2017/11/14 19:51:21.952 client.go:143: [error] [pd] failed to get cluster id: rpc error: code = Unknown desc = server not started
pd3_1    | 2017/11/14 19:51:21.952 etcdutil.go:125: [warning] check etcd http://pd3:2379 status, resp: &{cluster_id:10714500045671370219 member_id:12401378789912801188 revision:1 raft_term:2  3.2.6 24576 5121893302248312363 7 2}, err: <nil>, cost: 1.882221492s
pd1_1    | 2017/11/14 19:51:21.953 log.go:85: [info] etcdserver: [setting up the initial cluster version to 3.2]
tidb_1   | 2017/11/14 19:51:21.954 client.go:143: [error] [pd] failed to get cluster id: rpc error: code = Unknown desc = server not started
tidb_1   | 2017/11/14 19:51:21.956 client.go:143: [error] [pd] failed to get cluster id: rpc error: code = Unknown desc = server not started
pd3_1    | 2017/11/14 19:51:21.957 log.go:83: [info] etcdserver/membership: [set the initial cluster version to 3.2]
pd3_1    | 2017/11/14 19:51:21.957 log.go:85: [info] etcdserver/api: [enabled capabilities for version 3.2]
pd1_1    | 2017/11/14 19:51:21.958 log.go:83: [info] etcdserver/membership: [set the initial cluster version to 3.2]
pd1_1    | 2017/11/14 19:51:21.958 log.go:85: [info] etcdserver/api: [enabled capabilities for version 3.2]
tikv1_1  | 2017/11/14 19:51:21.957 util.rs:326: [ERROR] PD endpoint pd1:2379 failed to respond: Grpc(RpcFailure(RpcStatus { status: Unknown, details: Some("server not started") }))
tikv3_1  | 2017/11/14 19:51:21.956 util.rs:326: [ERROR] PD endpoint pd1:2379 failed to respond: Grpc(RpcFailure(RpcStatus { status: Unknown, details: Some("server not started") }))
pd2_1    | 2017/11/14 19:51:21.959 log.go:83: [info] etcdserver/membership: [set the initial cluster version to 3.2]
tikv2_1  | 2017/11/14 19:51:21.957 util.rs:326: [ERROR] PD endpoint pd1:2379 failed to respond: Grpc(RpcFailure(RpcStatus { status: Unknown, details: Some("server not started") }))
pd2_1    | 2017/11/14 19:51:21.960 log.go:85: [info] etcdserver/api: [enabled capabilities for version 3.2]
tikv2_1  | 2017/11/14 19:51:21.964 util.rs:326: [ERROR] PD endpoint pd2:2379 failed to respond: Grpc(RpcFailure(RpcStatus { status: Unknown, details: Some("server not started") }))
tikv3_1  | 2017/11/14 19:51:21.962 util.rs:326: [ERROR] PD endpoint pd2:2379 failed to respond: Grpc(RpcFailure(RpcStatus { status: Unknown, details: Some("server not started") }))
pd1_1    | 2017/11/14 19:51:21.964 etcdutil.go:125: [warning] check etcd http://pd1:2379 status, resp: &{cluster_id:10714500045671370219 member_id:5121893302248312363 revision:1 raft_term:2  3.2.6 24576 5121893302248312363 7 2}, err: <nil>, cost: 1.935101343s
tikv1_1  | 2017/11/14 19:51:21.964 util.rs:326: [ERROR] PD endpoint pd2:2379 failed to respond: Grpc(RpcFailure(RpcStatus { status: Unknown, details: Some("server not started") }))
pd3_1    | 2017/11/14 19:51:21.966 server.go:178: [info] init cluster id 6488360197392343761
pd2_1    | 2017/11/14 19:51:21.968 server.go:178: [info] init cluster id 6488360197392343761
pd1_1    | 2017/11/14 19:51:21.970 server.go:178: [info] init cluster id 6488360197392343761
tikv1_1  | 2017/11/14 19:51:21.977 util.rs:326: [ERROR] PD endpoint pd3:2379 failed to respond: Grpc(RpcFailure(RpcStatus { status: Unknown, details: Some("no leader") }))
tikv3_1  | 2017/11/14 19:51:21.977 util.rs:326: [ERROR] PD endpoint pd3:2379 failed to respond: Grpc(RpcFailure(RpcStatus { status: Unknown, details: Some("no leader") }))
tikv1_1  | 2017/11/14 19:51:21.977 tikv-server.rs:486: [ERROR] failed to create rpc client: Other(StringError("PD cluster failed to respond"))
tikv3_1  | 2017/11/14 19:51:21.978 tikv-server.rs:486: [ERROR] failed to create rpc client: Other(StringError("PD cluster failed to respond"))
pd1_1    | 2017/11/14 19:51:21.980 leader.go:107: [error] campaign leader err github.com/pingcap/pd/server/leader.go:214: campaign leader failed, other server may campaign ok
tikv2_1  | 2017/11/14 19:51:21.977 util.rs:326: [ERROR] PD endpoint pd3:2379 failed to respond: Grpc(RpcFailure(RpcStatus { status: Unknown, details: Some("no leader") }))
tikv2_1  | 2017/11/14 19:51:21.982 tikv-server.rs:486: [ERROR] failed to create rpc client: Other(StringError("PD cluster failed to respond"))
pd1_1    | 2017/11/14 19:51:21.984 leader.go:86: [info] leader is name:"pd2" member_id:6077736303471108965 peer_urls:"http://pd2:2380" client_urls:"http://pd2:2379" , watch it
pd3_1    | 2017/11/14 19:51:21.987 leader.go:107: [error] campaign leader err github.com/pingcap/pd/server/leader.go:214: campaign leader failed, other server may campaign ok
pd2_1    | 2017/11/14 19:51:21.992 tso.go:104: [info] sync and save timestamp: last 0001-01-01 00:00:00 +0000 UTC save 2017-11-14 19:51:24.987238558 +0000 UTC m=+6.045463713
pd2_1    | 2017/11/14 19:51:21.992 leader.go:249: [info] PD cluster leader pd2 is ready to serve
pd3_1    | 2017/11/14 19:51:21.993 leader.go:86: [info] leader is name:"pd2" member_id:6077736303471108965 peer_urls:"http://pd2:2380" client_urls:"http://pd2:2379" , watch it
docker_tikv1_1 exited with code 1
docker_tikv2_1 exited with code 1
docker_tikv3_1 exited with code 1
pd3_1    | 2017/11/14 19:51:22.962 log.go:85: [info] etcdserver/api/v3rpc: [grpc: Server.Serve failed to create ServerTransport:  connection error: desc = "transport: write tcp 172.18.0.2:2379->172.18.0.8:54474: write: broken pipe"
pd3_1    | ]
pd1_1    | 2017/11/14 19:51:22.962 log.go:85: [info] etcdserver/api/v3rpc: [grpc: Server.Serve failed to create ServerTransport:  connection error: desc = "transport: write tcp 172.18.0.3:2379->172.18.0.8:35576: write: broken pipe"
pd1_1    | ]
tidb_1   | 2017/11/14 19:51:44.354 backoff.go:206: [warning] backoffer.maxSleep 20000ms is exceeded, errors:
tidb_1   | region not found for key "mBootstra\xffpKey\x00\x00\x00\x00\xfb\x00\x00\x00\x00\x00\x00\x00s"
tidb_1   | region not found for key "mBootstra\xffpKey\x00\x00\x00\x00\xfb\x00\x00\x00\x00\x00\x00\x00s"
tidb_1   | region not found for key "mBootstra\xffpKey\x00\x00\x00\x00\xfb\x00\x00\x00\x00\x00\x00\x00s"
tidb_1   | 2017/11/14 19:51:44.355 session.go:1141: [fatal] check bootstrapped err [tikv:9001]PD server timeout[try again later]
docker_tidb_1 exited with code 1
pd2_1    | 2017/11/14 19:51:47.128 tso.go:122: [warning] clock offset: 184.800124ms, prev: 2017-11-14 19:51:46.943370548 +0000 UTC m=+28.001595752, now: 2017-11-14 19:51:47.128170672 +0000 UTC m=+28.186395880
pd2_1    | 2017/11/14 19:52:29.946 tso.go:122: [warning] clock offset: 151.153103ms, prev: 2017-11-14 19:52:29.795107913 +0000 UTC m=+70.853333109, now: 2017-11-14 19:52:29.946261016 +0000 UTC m=+71.004486187
pd2_1    | 2017/11/14 19:53:15.845 tso.go:122: [warning] clock offset: 152.150713ms, prev: 2017-11-14 19:53:15.693383017 +0000 UTC m=+116.751608306, now: 2017-11-14 19:53:15.84553373 +0000 UTC m=+116.903758904
pd2_1    | 2017/11/14 19:53:55.133 tso.go:122: [warning] clock offset: 184.282021ms, prev: 2017-11-14 19:53:54.948840323 +0000 UTC m=+156.007065486, now: 2017-11-14 19:53:55.133122344 +0000 UTC m=+156.191347633
pd2_1    | 2017/11/14 19:54:07.951 tso.go:122: [warning] clock offset: 253.7752ms, prev: 2017-11-14 19:54:07.697449917 +0000 UTC m=+168.755675219, now: 2017-11-14 19:54:07.951225117 +0000 UTC m=+169.009450316
pd2_1    | 2017/11/14 19:54:09.965 tso.go:122: [warning] clock offset: 216.646003ms, prev: 2017-11-14 19:54:09.74896993 +0000 UTC m=+170.807195092, now: 2017-11-14 19:54:09.965615933 +0000 UTC m=+171.023841086
pd2_1    | 2017/11/14 19:54:26.592 tso.go:128: [warning] invalid physical timestamp, prev: 2017-11-14 19:54:26.592057252 +0000 UTC m=+187.650282415, now: 2017-11-14 19:54:26.59285014 +0000 UTC m=+187.651075364, re-update later
pd2_1    | 2017/11/14 19:54:36.805 tso.go:122: [warning] clock offset: 162.723632ms, prev: 2017-11-14 19:54:36.643153048 +0000 UTC m=+197.701378279, now: 2017-11-14 19:54:36.80587668 +0000 UTC m=+197.864101898
pd2_1    | 2017/11/14 19:54:41.176 tso.go:122: [warning] clock offset: 532.788304ms, prev: 2017-11-14 19:54:40.643893901 +0000 UTC m=+201.702119086, now: 2017-11-14 19:54:41.176682205 +0000 UTC m=+202.234907382
pd2_1    | 2017/11/14 19:54:57.123 tso.go:122: [warning] clock offset: 180.438154ms, prev: 2017-11-14 19:54:56.943234383 +0000 UTC m=+218.001459669, now: 2017-11-14 19:54:57.123672537 +0000 UTC m=+218.181897700
pd2_1    | 2017/11/14 19:55:13.129 tso.go:122: [warning] clock offset: 478.298986ms, prev: 2017-11-14 19:55:12.650888337 +0000 UTC m=+233.709113548, now: 2017-11-14 19:55:13.129187323 +0000 UTC m=+234.187412508
pd2_1    | 2017/11/14 19:56:28.979 tso.go:122: [warning] clock offset: 180.612452ms, prev: 2017-11-14 19:56:28.798972888 +0000 UTC m=+309.857198116, now: 2017-11-14 19:56:28.97958534 +0000 UTC m=+310.037810527
pd2_1    | 2017/11/14 19:56:31.133 tso.go:122: [warning] clock offset: 237.807624ms, prev: 2017-11-14 19:56:30.895229678 +0000 UTC m=+311.953454947, now: 2017-11-14 19:56:31.133037302 +0000 UTC m=+312.191262464
pd2_1    | 2017/11/14 19:57:17.269 tso.go:122: [warning] clock offset: 376.946135ms, prev: 2017-11-14 19:57:16.892927702 +0000 UTC m=+357.951152933, now: 2017-11-14 19:57:17.269873837 +0000 UTC m=+358.328099048
pd2_1    | 2017/11/14 19:57:44.141 tso.go:122: [warning] clock offset: 194.513912ms, prev: 2017-11-14 19:57:43.947007891 +0000 UTC m=+385.005233162, now: 2017-11-14 19:57:44.141521803 +0000 UTC m=+385.199746972
pd2_1    | 2017/11/14 19:57:47.282 tso.go:122: [warning] clock offset: 384.642887ms, prev: 2017-11-14 19:57:46.898320969 +0000 UTC m=+387.956546145, now: 2017-11-14 19:57:47.282963856 +0000 UTC m=+388.341189009
pd2_1    | 2017/11/14 19:57:47.902 tso.go:122: [warning] clock offset: 153.881047ms, prev: 2017-11-14 19:57:47.748325909 +0000 UTC m=+388.806551100, now: 2017-11-14 19:57:47.902206956 +0000 UTC m=+388.960432118
pd2_1    | 2017/11/14 19:57:51.623 tso.go:122: [warning] clock offset: 224.113159ms, prev: 2017-11-14 19:57:51.399286109 +0000 UTC m=+392.457511311, now: 2017-11-14 19:57:51.623399268 +0000 UTC m=+392.681624443
pd2_1    | 2017/11/14 19:57:55.235 tso.go:122: [warning] clock offset: 491.740224ms, prev: 2017-11-14 19:57:54.74332355 +0000 UTC m=+395.801548726, now: 2017-11-14 19:57:55.235063774 +0000 UTC m=+396.293288945
pd2_1    | 2017/11/14 19:58:00.636 tso.go:122: [warning] clock offset: 192.401202ms, prev: 2017-11-14 19:58:00.443958314 +0000 UTC m=+401.502183675, now: 2017-11-14 19:58:00.636359516 +0000 UTC m=+401.694584734
pd2_1    | 2017/11/14 19:58:00.995 tso.go:122: [warning] clock offset: 301.684122ms, prev: 2017-11-14 19:58:00.693350676 +0000 UTC m=+401.751576075, now: 2017-11-14 19:58:00.995034798 +0000 UTC m=+402.053259989
pd2_1    | 2017/11/14 19:58:34.306 tso.go:122: [warning] clock offset: 154.693051ms, prev: 2017-11-14 19:58:34.151699281 +0000 UTC m=+435.209924510, now: 2017-11-14 19:58:34.306392332 +0000 UTC m=+435.364617484
pd2_1    | 2017/11/14 19:58:37.656 tso.go:122: [warning] clock offset: 310.939519ms, prev: 2017-11-14 19:58:37.345760541 +0000 UTC m=+438.403985770, now: 2017-11-14 19:58:37.65670006 +0000 UTC m=+438.714925219
pd2_1    | 2017/11/14 19:58:37.846 tso.go:122: [warning] clock offset: 153.708047ms, prev: 2017-11-14 19:58:37.693243259 +0000 UTC m=+438.751468449, now: 2017-11-14 19:58:37.846951306 +0000 UTC m=+438.905176483
pd2_1    | 2017/11/14 19:58:39.105 tso.go:122: [warning] clock offset: 311.660602ms, prev: 2017-11-14 19:58:38.794038963 +0000 UTC m=+439.852264217, now: 2017-11-14 19:58:39.105699565 +0000 UTC m=+440.163924780
pd2_1    | 2017/11/14 19:58:41.092 tso.go:122: [warning] clock offset: 397.503863ms, prev: 2017-11-14 19:58:40.694653671 +0000 UTC m=+441.752878855, now: 2017-11-14 19:58:41.092157534 +0000 UTC m=+442.150382722
pd2_1    | 2017/11/14 19:58:41.092 tso.go:128: [warning] invalid physical timestamp, prev: 2017-11-14 19:58:41.092157534 +0000 UTC m=+442.150382722, now: 2017-11-14 19:58:41.092811067 +0000 UTC m=+442.151036244, re-update later
pd2_1    | 2017/11/14 19:58:47.616 tso.go:122: [warning] clock offset: 169.135084ms, prev: 2017-11-14 19:58:47.447342003 +0000 UTC m=+448.505567388, now: 2017-11-14 19:58:47.616477087 +0000 UTC m=+448.674702278

remove log printing

when i create a tikv client with tikv.NewRawKVClient( ).
it automatically prints on console the following logs:

time="2018-07-12T14:06:38+08:00" level=info msg="[pd] create pd client with endpoints [175.16.1.50:2379 175.16.1.53:2379 175.16.1.54:2379]"
time="2018-07-12T14:06:38+08:00" level=info msg="[pd] leader switches to: http://175.16.1.50:2379, previous: "
time="2018-07-12T14:06:38+08:00" level=info msg="[pd] init cluster id 8576091382420269395"

how can i switch off those logs printing ?

thanks.

panic while starting tikv against pd-server

I'm using the recommended binaries deployment tidb-latest-linux-amd64.tar.gz

I started pd-server like this

pd-server --data-dir=/tmp

and I get

and starting tikv-server like this

root@vm-5439:~# tikv-server --pd "http://127.0.0.1:2379" 
--store=tikv

and I get

2017/01/18 10:32:14.366 mod.rs:371: [INFO] Welcome to TiKV.
2017/01/18 10:32:14.366 mod.rs:372: [INFO] Version:
2017/01/18 10:32:14.366 mod.rs:373: [INFO] Git Commit Hash: 5424ca1b90dc4b4aa56a29d258a63a1bd09f2139
2017/01/18 10:32:14.366 mod.rs:374: [INFO] UTC Build Time:  2017-01-18 05:55:57
2017/01/18 10:32:14.366 tikv-server.rs:140: [INFO] rocksdb.max-open-files use default Some(40960)
2017/01/18 10:32:14.366 tikv-server.rs:231: [WARN] Limit("kernel parameters net.core.somaxconn got 128, expect 32768")
2017/01/18 10:32:14.366 tikv-server.rs:231: [WARN] Limit("kernel parameters net.ipv4.tcp_syncookies got 1, expect 0")
2017/01/18 10:32:14.366 tikv-server.rs:231: [WARN] Limit("kernel parameters vm.swappiness got 60, expect 0")
2017/01/18 10:32:14.366 tikv-server.rs:77: [INFO] flag A: None
2017/01/18 10:32:14.366 tikv-server.rs:111: [INFO] server.addr use default Some("127.0.0.1:20160")
2017/01/18 10:32:14.366 tikv-server.rs:116: [INFO] toml value server.addr: "127.0.0.1:20160"
2017/01/18 10:32:14.366 tikv-server.rs:77: [INFO] flag pd: Some("http://127.0.0.1:2379")
2017/01/18 10:32:16.779 panic_hook.rs:85: [ERROR] thread 'main' panicked 'Address("invalid addr: http://127.0.0.1:2379")' at "src/bin/tikv-server.rs:820"
stack backtrace:
   0:     0x555eb1ec4e9e - backtrace::backtrace::libunwind::trace
                        at /home/jenkins/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.2.3/src/backtrace/libunwind.rs:54
                         - backtrace::backtrace::trace<closure>
                        at /home/jenkins/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.2.3/src/backtrace/mod.rs:70
   1:     0x555eb1ec55b3 - backtrace::capture::{{impl}}::new
                        at /home/jenkins/.target/release/build/backtrace-3bc1ff360ebb00cb/out/capture.rs:79
   2:     0x555eb1aaef20 - tikv::util::panic_hook::set_exit_hook::{{closure}}
                        at /home/jenkins/workspace/TIKV_POST_COMMIT_FLOW/go/src/github.com/pingcap/tikv/src/util/panic_hook.rs:84
   3:     0x555eb1ff4117 - std::panicking::rust_panic_with_hook::h105c3d42fcd2fb5e
   4:     0x555eb1ff4002 - std::panicking::begin_panic::hbf62ea4a5ff3f9de
   5:     0x555eb1ff3f30 - std::panicking::begin_panic_fmt::h20f5943904e5791d
   6:     0x555eb1970aa6 - tikv_server::main
                        at /home/jenkins/workspace/TIKV_POST_COMMIT_FLOW/go/src/github.com/pingcap/tikv/src/bin/tikv-server.rs:8
   7:     0x555eb1ff3e07 - std::panicking::try::call::h5df3ac2979db3c90
   8:     0x555eb1ffc666 - __rust_maybe_catch_panic
   9:     0x555eb1ff2fa9 - std::rt::lang_start::hfe9ab243c60ffb9b
  10:     0x7f6226f9582f - __libc_start_main
  11:     0x555eb1871a2d - <unknown>
  12:                0x0 - <unknown>

Apparently i needed to change --store=tikv1 instead of tikv in the docs.

start with fatal error

TASK [set_fact] *******************************************************************************************************************************************************
fatal: [192.168.0.111]: FAILED! => {"msg": "The conditional check '((existing_api_keys['json'] | selectattr("name", "equalto", "grafana_apikey")) | list) | length == 1' failed. The error was: no test named 'equalto'\n\nThe error appears to have been in '/opt/tidb-ansible/create_grafana_api_keys.yml': line 21, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- set_fact:\n ^ here\n"}
to retry, use: --limit @/opt/tidb-ansible/start.retry

Clarify which mydumper to use

The manual currently includes a link to mydumper, but doesn't mention we have a fork of it as well:
https://pingcap.com/docs/op-guide/backup-restore/

The upstream mydumper is actually unsafe for TiDB. We have a PR request to fix it, and assuming it's merged we should update the advice to say the minimum version to use.

Or alternatively, we should point to our official mydumper

go version check problem

scripts/check_requirement.sh seems not correctly check the go version( GO_VER_2 ).

on OSX
go version: 1.10.3

go version | awk 'match($0, /([0-9])+(.[0-9])+/) { ver = substr($0, RSTART, RLENGTH); split(ver, n, "."); print n[2];}'

output: 1

sql: Document which sql_modes are supported

In pingcap/tidb#2738 it mentions that TiDB should support more sql_modes, but it is not clear which existing modes are supported.

Because TiDB does not produce an error when setting an unsupported sql_mode, it is important that this be documented on sql/mysql-compatibility.md

fio randread iops of deploy_dir disk is too low

./fio -ioengine=libaio -bs=32k -direct=1 -thread -rw=randrw -percentage_random=100,0 -size=10G -filename=fio_randr_write_test.txt -name='PingCAP' -iodepth=4 -runtime=60

I meet a problem, as follows:
image
Ps: SSD 10TB

Question:

  1. Why are the parameters of the command set like this?

  2. How to solve it, and I don't want to skip the test by configuring?

Urgent!!!

Thanks.

Launch tidb, tikv or pd with --config option

I have not found the detailed instruction about the --config option for launching tidb/tikv/pd in command line. The name or path name of a configure file should be followed to this option. So which kind of configure file is supported? XML or other format?

JSON Functions / JSON Function and Generated Columns

The documentation currently has two pages which overlap substantially:

  1. https://pingcap.com/docs/sql/json-functions-generated-column/
  2. https://pingcap.com/docs/sql/json-functions/

Both pages need updates - but the 2nd is more out of date. I am wondering if we should rename json-functions + generated columns to just "Generated Columns" and move all JSON functionality to the JSON functions page? (The generated columns page can refer to JSON as a use case still.)

Can't build the tidb

install the go and rust using check_requirement.sh

failed to build tidb using build.sh

build log:

building TiDB components in scripts_path
checking if go is installed
go version go1.9.2 linux/amd64
checking if rust is installed
rustc 1.27.0-nightly (565235ee7 2018-05-07)
building TiDB...
Cloning into 'scripts_path/deps/go/src/github.com/pingcap/tidb'...
remote: Counting objects: 1802, done.
remote: Compressing objects: 100% (1548/1548), done.
remote: Total 1802 (delta 235), reused 1020 (delta 158), pack-reused 0
Receiving objects: 100% (1802/1802), 4.57 MiB | 588.00 KiB/s, done.
Resolving deltas: 100% (235/235), done.
Checking connectivity... done.
make parser
make[1]: Entering directory `scripts_path/deps/go/src/github.com/pingcap/tidb'
CGO_ENABLED=0 go build  -o bin/goyacc parser/goyacc/main.go
bin/goyacc -o /dev/null parser/parser.y
Parse table entries: 682338 of 1722972, x 16 bits == 1364676 bytes
bin/goyacc -o parser/parser.go parser/parser.y 2>&1 | egrep "(shift|reduce)/reduce" | awk '{print} END {if (NR > 0) {print "Find conflict in parser.y. Please check y.output for more information."; exit 1;}}'
rm -f y.output
make[1]: Leaving directory `scripts_path/deps/go/src/github.com/pingcap/tidb'
fatal: No names found, cannot describe anything.
CGO_ENABLED=0 go build   -ldflags '-X "github.com/pingcap/tidb/mysql.TiDBReleaseVersion=" -X "github.com/pingcap/tidb/util/printer.TiDBBuildTS=2018-05-08 12:25:25" -X "github.com/pingcap/tidb/util/printer.TiDBGitHash=8d345cd09aedfa72d3018ee5ebdfd452de056e25" -X "github.com/pingcap/tidb/util/printer.TiDBGitBranch=master" -X "github.com/pingcap/tidb/util/printer.GoVersion=go version go1.9.2 linux/amd64"' -o bin/tidb-server tidb-server/main.go
# github.com/pingcap/tidb/statistics
statistics/histogram.go:124:10: undefined: math.Round
make: *** [server] Error 2

Add configuration in deployment documentation

We should add how to set configuration for pd and tikv in deployment documentation, some users only refer to deployment documentation and forget to set command line argument --config in their deployment.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.