Skip to content
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

log: do not add stack to error log #1532

Merged
merged 2 commits into from
May 9, 2019
Merged

Conversation

nolouch
Copy link
Contributor

@nolouch nolouch commented May 8, 2019

What problem does this PR solve?

close #1523

[2019/04/29 04:25:37.846 +00:00] [ERROR] [leader.go:80] ["no etcd leader, check leader later"] [stack="github.com/pingcap/log.Error\n\t/go/pkg/mod/github.com/pingcap/log@v0.0.0-20190214045112-b37da76f67a7/global.go:42\ngithub.com/pingcap/pd/server.(*Server).leaderLoop\n\t/go/src/github.com/pingcap/pd/server/leader.go:80"][2019/04/29 04:25:38.046 +00:00] [ERROR] [leader.go:80] ["no etcd leader, check leader later"] [stack="github.com/pingcap/log.Error\n\t/go/pkg/mod/github.com/pingcap/log@v0.0.0-20190214045112-b37da76f67a7/global.go:42\ngithub.com/pingcap/pd/server.(*Server).leaderLoop\n\t/go/src/github.com/pingcap/pd/server/leader.go:80"]

The stack trace of error level is not required, we can add a field if we need it.

What is changed and how it works?

change the stack enable level.

Check List

Tests

  • Manual test (add detailed scripts or steps below)

@nolouch nolouch requested review from disksing and rleungx May 8, 2019 12:39
@codecov-io
Copy link

codecov-io commented May 8, 2019

Codecov Report

Merging #1532 into master will decrease coverage by 0.17%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1532      +/-   ##
==========================================
- Coverage   67.71%   67.53%   -0.18%     
==========================================
  Files         158      158              
  Lines       15649    15649              
==========================================
- Hits        10596    10568      -28     
- Misses       4097     4113      +16     
- Partials      956      968      +12
Impacted Files Coverage Δ
server/config.go 82.08% <100%> (ø) ⬆️
server/region_syncer/history_buffer.go 83.33% <100%> (ø) ⬆️
pkg/tempurl/tempurl.go 57.14% <0%> (-14.29%) ⬇️
pkg/etcdutil/etcdutil.go 86.04% <0%> (-9.31%) ⬇️
server/schedulers/shuffle_hot_region.go 64.1% <0%> (-6.42%) ⬇️
server/util.go 70.86% <0%> (-4.64%) ⬇️
server/etcd_kv.go 65.95% <0%> (-4.26%) ⬇️
server/namespace_cluster.go 81.81% <0%> (-3.9%) ⬇️
server/schedule/basic_cluster.go 88.67% <0%> (-3.78%) ⬇️
server/schedule/region_scatterer.go 86.02% <0%> (-2.21%) ⬇️
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4573d20...6006b45. Read the comment docs.

@ngaut
Copy link
Member

ngaut commented May 8, 2019

LGTM

@disksing disksing merged commit 474535e into tikv:master May 9, 2019
@nolouch nolouch deleted the error-stack branch May 9, 2019 06:21
nolouch added a commit that referenced this pull request May 23, 2019
* tiny clean up code (#1526)

Signed-off-by: Ryan Leung <rleungx@gmail.com>

* config:  enable use region storage by default (#1524)

* config: default enable use region storage

* schedulers: let hot region balance not affect by balance-region-scheduler-limit (#1522)

Signed-off-by: nolouch <nolouch@gmail.com>

* log: do not add stack to error log (#1532)

* *: replace gofail with pingcap/failpoint (#1534)

* *: replace gofail with pingcap/failpoint

Signed-off-by: disksing <i@disksing.com>

* fix typo

Signed-off-by: disksing <i@disksing.com>

* fix typo

Signed-off-by: disksing <i@disksing.com>

* Update server/cluster_test.go

Co-Authored-By: Lonng <chris@lonng.org>

* Update server/tso.go

Co-Authored-By: Lonng <chris@lonng.org>

* Update server/tso.go

Co-Authored-By: Lonng <chris@lonng.org>

* check enable failpoint result

Signed-off-by: disksing <i@disksing.com>

* Update server/cluster.go

Co-Authored-By: Lonng <chris@lonng.org>

* server: set timeout for MoveLeader (#1533)

* server: set timeout for MoveLeader

Signed-off-by: disksing <i@disksing.com>

* client, server: add ScanRegions gRPC protocol support (#1535)

* client, server: support ScanRegions gRPC protocol

Signed-off-by: disksing <i@disksing.com>

* schedule: actively push operator  (#1536)

* schedule: actively push operator

Signed-off-by: nolouch <nolouch@gmail.com>

* *: update some dead links (#1543)

* update links

Signed-off-by: Ryan Leung <rleungx@gmail.com>

* Add windows build script (#1540)

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* fix operator timeout metrics (#1541)

Signed-off-by: Ryan Leung <rleungx@gmail.com>

* *:Rollback config in store when kv.persist failed (#1476)

* tests: independent region sync test (#1545)

* tests: independent syncer region test

Signed-off-by: nolouch <nolouch@gmail.com>

* schedule: operator limit for stores (#1474)

* add store limit for scheduling

Signed-off-by: Ryan Leung <rleungx@gmail.com>

* statistic: add the statistic of flow (#1548)

* store_statistic: add the statistic of flow

Signed-off-by: nolouch <nolouch@gmail.com>
@nolouch nolouch added the component/log Log. label Jul 10, 2019
nolouch added a commit to nolouch/pd that referenced this pull request Jul 10, 2019
nolouch added a commit to nolouch/pd that referenced this pull request Jul 10, 2019
nolouch added a commit to nolouch/pd that referenced this pull request Jul 10, 2019
nolouch added a commit to nolouch/pd that referenced this pull request Jul 10, 2019
youjiali1995 pushed a commit that referenced this pull request Jul 17, 2019
* *:Start swithing to the zap logger (#1422)

Signed-off-by: nolouch <nolouch@gmail.com>

* *: log format for schedule, scheduler, syncer, api (#1423)

* log format for schedule, scheduler, syncer, api

Signed-off-by: rleungx <rleungx@gmail.com>

* pdctl, api: support hex format keys (#1309)

pdctl, api: support hex format keys

Signed-off-by: disksing <i@disksing.com>

* *: log format for tools, client, pkg, table (#1424)

* log format for tools, client, pkg, table, simulator

Signed-off-by: rleungx <rleungx@gmail.com>

* *: log format for server (#1431)

* *: log format for server

Signed-off-by: nolouch <nolouch@gmail.com>

* *: log format for logutil, server/core (#1438)

* *: log format for logutil,server/core

* *: improve some logs (#1516)

* improve some logs

Signed-off-by: Ryan Leung <rleungx@gmail.com>

* log: do not add stack to error log (#1532)

* pkg, tools: improve the log message (#1636)

* pkg,tools: improve the log message

Signed-off-by: nolouch <nolouch@gmail.com>

* core: use hex format for region meta key (#1627)

Signed-off-by: Ryan Leung <rleungx@gmail.com>=

* address comments

Signed-off-by: nolouch <nolouch@gmail.com>

* address comments

Signed-off-by: nolouch <nolouch@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ugly error log
5 participants