Skip to content

Commit

Permalink
session: set tidb_server_memory_limit to defValue during bootstrap (p…
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored and wuhuizuo committed Feb 21, 2023
0 parents commit e337eed
Show file tree
Hide file tree
Showing 4,012 changed files with 1,506,255 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
29 changes: 29 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
startup --host_jvm_args=-Xmx5g
startup --unlimit_coredumps

run:ci --color=yes

build --announce_rc
build --experimental_guard_against_concurrent_changes
build --experimental_remote_merkle_tree_cache
build --java_language_version=17
build --java_runtime_version=17
build --tool_java_language_version=17
build --tool_java_runtime_version=17
build --incompatible_strict_action_env --incompatible_enable_cc_toolchain_resolution
build:ci --color=yes
build:ci --experimental_remote_cache_compression
build:release --workspace_status_command=./build/print-workspace-status.sh --stamp
build:release --config=ci
build:race --config=ci
build:race --@io_bazel_rules_go//go/config:race --test_env=GORACE=halt_on_error=1 --test_sharding_strategy=disabled

test --test_env=TZ=Asia/Shanghai
test --test_output=errors --test_summary=testcase
test:ci --color=yes
test:ci --verbose_failures --test_verbose_timeout_warnings
test:ci --test_env=GO_TEST_WRAP_TESTV=1
test:ci --experimental_ui_max_stdouterr_bytes=104857600
test:race --test_timeout=1200,6000,18000,72000

try-import /data/bazel
1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5.3.2
47 changes: 47 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
codecov:
notify:
require_ci_to_pass: yes

coverage:
precision: 4
round: down
range: "65...90"

status:
project:
default:
threshold: 0.2 #Allow the coverage to drop by threshold%, and posting a success status.
patch:
default:
target: 0% # trial operation
changes: no

parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: no
macro: no

comment:
layout: "header, diff"
behavior: default
require_changes: no

ignore:
- "LICENSES"
- "*_test.go"
- ".git"
- "*.yml"
- "*.md"
- "cmd/.*"
- "docs/.*"
- "vendor/.*"
- "ddl/failtest/.*"
- "ddl/testutil/.*"
- "executor/seqtest/.*"
- "metrics/.*"
- "expression/generator/.*"
- "br/pkg/mock/.*"

10 changes: 10 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.git/
bazel-bin/
bazel-out/
bazel-tidb/
bazel-testlogs/
bin/
tidb-server/tidb-server
*.test.bin
cmd/
Dockerfile
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8

# tab_size = 4 spaces
[*.go]
indent_style = tab
indent_size = 4
trim_trailing_whitespace = true
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

# Declare files that will always have LF line endings on checkout.
*.y text eol=lf
5 changes: 5 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Require review from domain experts when the PR modified significant config files.
/sessionctx/variable @pingcap/tidb-configuration-reviewer
/config/config.toml.example @pingcap/tidb-configuration-reviewer
/session/bootstrap.go @pingcap/tidb-configuration-reviewer
/telemetry/ @pingcap/telemetry-reviewer
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: "\U0001F41B Bug Report"
about: As a User, I want to report a Bug.
labels: type/bug
---

## Bug Report

Please answer these questions before submitting your issue. Thanks!

### 1. Minimal reproduce step (Required)

<!-- a step by step guide for reproducing the bug. -->

### 2. What did you expect to see? (Required)

### 3. What did you see instead (Required)

### 4. What is your TiDB version? (Required)

<!-- Paste the output of SELECT tidb_version() -->

7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: "\U0001F680 Enhancement"
about: As a TiDB developer, I want to make an enhancement.
labels: type/enhancement
---

## Enhancement
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: "\U0001F680 Feature Request"
about: As a user, I want to request a New Feature on the product.
labels: type/feature-request
---

## Feature Request

**Is your feature request related to a problem? Please describe:**
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->

**Describe the feature you'd like:**
<!-- A clear and concise description of what you want to happen. -->

**Describe alternatives you've considered:**
<!-- A clear and concise description of any alternative solutions or features you've considered. -->

**Teachability, Documentation, Adoption, Migration Strategy:**
<!-- If you can, explain some scenarios how users might use this, situations it would be helpful in. Any API designs, mockups, or diagrams are also helpful. -->
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/general-question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: "\U0001F914 Ask a Question"
about: I want to ask a question.
labels: type/question
---

## General Question

<!--
Before asking a question, make sure you have:
- Searched existing Stack Overflow questions.
- Googled your question.
- Searched open and closed [GitHub issues](https://github.com/pingcap/tidb/issues?utf8=%E2%9C%93&q=is%3Aissue)
- Read the documentation:
- [TiDB Readme](https://github.com/pingcap/tidb)
- [TiDB Doc](https://github.com/pingcap/docs)
-->
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/performance-questions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: "\U0001F947 Ask a Database Performance Question"
about: I want to ask a database performance question.
labels: type/question, type/performance
---

## Performance Questions

- What version of TiDB are you using?
<!-- You can try `tidb-server -V` or run `select tidb_version();` on TiDB to get this information -->

- What's the observed and your expected performance respectively?

- Have you compared TiDB with other databases? If yes, what's their difference?

- For a specific slow SQL query, please provide the following information:
- Whether you analyzed the tables involved in the query and how long it is after you ran the last `ANALYZE`.
- Whether this SQL query always or occasionally runs slowly.
- The `EXPLAIN ANALYZE` result of this query if your TiDB version is higher than 2.1, or you can just provide the `EXPLAIN` result.
- The plain text of the SQL query and table schema so we can test it locally. It would be better if you can provide the dumped statistics information.
<!-- you can use `show create table ${involved_table}\G` to get the table schema.-->
<!-- use `curl -G "http://${tidb-server-ip}:${tidb-server-status-port}/stats/dump/${db_name}/${table_name}" > ${table_name}_stats.json` to get the dumped statistics of one involved table.-->
- The `EXPLAIN` result of the compared database. For MySQL, `EXPLAIN format=json`'s result will be more helpful.
- Other information that is useful from your perspective.

- For a general performance question, e.g. the benchmark result you got by yourself is not expected, please provide the following information:
- Your cluster's topology architecture.
- A simple description of you workload.
- The metrics PDF generated from Grafana monitor. Remember to set the time range to the performance issue duration.
43 changes: 43 additions & 0 deletions .github/licenserc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
header:
license:
spdx-id: Apache-2.0
copyright-owner: PingCAP, Inc.
paths-ignore:
- "docs/"
- "br/"
- ".gitignore"
- ".dockerignore"
- ".gitattributes"
- ".cilinter.yaml"
- ".golangci.yml"
- ".golangci_br.yml"
- "LICENSES/"
- "**/BUILD.bazel"
- "WORKSPACE"
- ".bazelrc"
- "**/*.key"
- "**/*.md"
- "**/*.json"
- "**/*.toml"
- "**/*.pem"
- "**/*.crt"
- "**/*.test"
- "**/*.result"
- "**/*.example"
- "**/*.patch"
- "**/*.bzl"
- ".codecov.yml"
- "Jenkinsfile"
- ".editorconfig"
- "hooks/pre-commit"
- "**/go.mod"
- "**/go.sum"
- "LICENSE"
- ".github/"
- "parser/"
- "dumpling/"
- "tidb-binlog/driver/example"
- "tidb-binlog/proto/go-binlog/secondary_binlog.pb.go"
- "**/*.sql"
- ".bazelversion"
comment: on-failure
60 changes: 60 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<!--
Thank you for contributing to TiDB!
PR Title Format:
1. pkg [, pkg2, pkg3]: what's changed
2. *: what's changed
-->

### What problem does this PR solve?
<!--
Please create an issue first to describe the problem.
There MUST be one line starting with "Issue Number: " and
linking the relevant issues via the "close" or "ref".
For more info, check https://pingcap.github.io/tidb-dev-guide/contribute-to-tidb/contribute-code.html#referring-to-an-issue.
-->

Issue Number: close #xxx

Problem Summary:

### What is changed and how it works?

### Check List

Tests <!-- At least one of them must be included. -->

- [ ] Unit test
- [ ] Integration test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No code

Side effects

- [ ] Performance regression: Consumes more CPU
- [ ] Performance regression: Consumes more Memory
- [ ] Breaking backward compatibility

Documentation

- [ ] Affects user behaviors
- [ ] Contains syntax changes
- [ ] Contains variable changes
- [ ] Contains experimental features
- [ ] Changes MySQL compatibility

### Release note

<!-- compatibility change, improvement, bugfix, and new feature need a release note -->

Please refer to [Release Notes Language Style Guide](https://pingcap.github.io/tidb-dev-guide/contribute-to-tidb/release-notes-style-guide.html) to write a quality release note.

```release-note
None
```

0 comments on commit e337eed

Please sign in to comment.