hunk
dict
file
stringlengths
0
11.8M
file_path
stringlengths
2
234
label
int64
0
1
commit_url
stringlengths
74
103
dependency_score
listlengths
5
5
{ "id": 13, "code_window": [ "\t\t}\n", "\t\tif done != test.done || msg != test.msg {\n", "\t\t\tt.Errorf(\"deployment with generation %d, %d replicas specified, and status:\\n%+v\\nreturned:\\n%q, %t\\nwant:\\n%q, %t\",\n", "\t\t\t\ttest.generation,\n", "\t\t\t\ttest.specReplicas,\n", "\t\...
/* Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
pkg/kubectl/rollout_status.go
1
https://github.com/kubernetes/kubernetes/commit/1923cc60c95943543f036a1c9633f3c4219c917f
[ 0.002101072110235691, 0.0004827352240681648, 0.00016821862664073706, 0.0002861689426936209, 0.0005226670764386654 ]
{ "id": 13, "code_window": [ "\t\t}\n", "\t\tif done != test.done || msg != test.msg {\n", "\t\t\tt.Errorf(\"deployment with generation %d, %d replicas specified, and status:\\n%+v\\nreturned:\\n%q, %t\\nwant:\\n%q, %t\",\n", "\t\t\t\ttest.generation,\n", "\t\t\t\ttest.specReplicas,\n", "\t\...
/* Copyright (c) 2015-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
vendor/github.com/vmware/govmomi/object/datastore.go
0
https://github.com/kubernetes/kubernetes/commit/1923cc60c95943543f036a1c9633f3c4219c917f
[ 0.0006099830497987568, 0.0001867369719548151, 0.00016057092580012977, 0.00017276988364756107, 0.00007265498425113037 ]
{ "id": 13, "code_window": [ "\t\t}\n", "\t\tif done != test.done || msg != test.msg {\n", "\t\t\tt.Errorf(\"deployment with generation %d, %d replicas specified, and status:\\n%+v\\nreturned:\\n%q, %t\\nwant:\\n%q, %t\",\n", "\t\t\t\ttest.generation,\n", "\t\t\t\ttest.specReplicas,\n", "\t\...
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. package route53 import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/client/metadata" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/aws/signer/v4" "github.com/aws/aws-sdk-go/priva...
vendor/github.com/aws/aws-sdk-go/service/route53/service.go
0
https://github.com/kubernetes/kubernetes/commit/1923cc60c95943543f036a1c9633f3c4219c917f
[ 0.00017392216250300407, 0.00016917529865168035, 0.00016315279935952276, 0.00016927893739193678, 0.0000039331644074991345 ]
{ "id": 13, "code_window": [ "\t\t}\n", "\t\tif done != test.done || msg != test.msg {\n", "\t\t\tt.Errorf(\"deployment with generation %d, %d replicas specified, and status:\\n%+v\\nreturned:\\n%q, %t\\nwant:\\n%q, %t\",\n", "\t\t\t\ttest.generation,\n", "\t\t\t\ttest.specReplicas,\n", "\t\...
package(default_visibility = ["//visibility:public"]) licenses(["notice"]) load( "@io_bazel_rules_go//go:def.bzl", "go_library", ) go_library( name = "go_default_library", srcs = ["docker.go"], tags = ["automanaged"], deps = ["//vendor/github.com/docker/engine-api/types:go_default_library"], ...
vendor/github.com/google/cadvisor/utils/docker/BUILD
0
https://github.com/kubernetes/kubernetes/commit/1923cc60c95943543f036a1c9633f3c4219c917f
[ 0.0001759308361215517, 0.00017491652397438884, 0.00017336483870167285, 0.00017545389709994197, 0.0000011143497431476135 ]
{ "id": 1, "code_window": [ "\t\t}\n", "\t\tif err := job.NoTxn().FractionProgressed(ctx, jobs.FractionUpdater(1.1)); !testutils.IsError(err, \"outside allowable range\") {\n", "\t\t\tt.Fatalf(\"expected 'outside allowable range' error, but got %v\", err)\n", "\t\t}\n", "\t\tif err := job.NoTxn(...
// Copyright 2019 The Cockroach Authors. // // Use of this software is governed by the Business Source License // included in the file licenses/BSL.txt. // // As of the Change Date specified in that file, in accordance with // the Business Source License, use of this software will be governed // by the Apache License, ...
pkg/jobs/update.go
1
https://github.com/cockroachdb/cockroach/commit/66345a5db9de739faf4edbbaaae4c606daaec03f
[ 0.00363012682646513, 0.0008507987367920578, 0.0001562792167533189, 0.00021113621187396348, 0.0009351781918667257 ]
{ "id": 1, "code_window": [ "\t\t}\n", "\t\tif err := job.NoTxn().FractionProgressed(ctx, jobs.FractionUpdater(1.1)); !testutils.IsError(err, \"outside allowable range\") {\n", "\t\t\tt.Fatalf(\"expected 'outside allowable range' error, but got %v\", err)\n", "\t\t}\n", "\t\tif err := job.NoTxn(...
// Copyright 2017 The Cockroach Authors. // // Use of this software is governed by the Business Source License // included in the file licenses/BSL.txt. // // As of the Change Date specified in that file, in accordance with // the Business Source License, use of this software will be governed // by the Apache License, ...
pkg/sql/testutils.go
0
https://github.com/cockroachdb/cockroach/commit/66345a5db9de739faf4edbbaaae4c606daaec03f
[ 0.00032487165299244225, 0.00017682823818176985, 0.00015983829507604241, 0.0001696226536296308, 0.00003446239497861825 ]
{ "id": 1, "code_window": [ "\t\t}\n", "\t\tif err := job.NoTxn().FractionProgressed(ctx, jobs.FractionUpdater(1.1)); !testutils.IsError(err, \"outside allowable range\") {\n", "\t\t\tt.Fatalf(\"expected 'outside allowable range' error, but got %v\", err)\n", "\t\t}\n", "\t\tif err := job.NoTxn(...
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "quotapool", srcs = [ "config.go", "int_rate.go", "intpool.go", "notify_queue.go", "quotapool.go", ], importpath = "github.com/cockroachdb/cockroach/pkg/util/quotapool", visibi...
pkg/util/quotapool/BUILD.bazel
0
https://github.com/cockroachdb/cockroach/commit/66345a5db9de739faf4edbbaaae4c606daaec03f
[ 0.0001773571129888296, 0.0001743389293551445, 0.00017092932830564678, 0.00017437015776522458, 0.0000020954112187610008 ]
{ "id": 1, "code_window": [ "\t\t}\n", "\t\tif err := job.NoTxn().FractionProgressed(ctx, jobs.FractionUpdater(1.1)); !testutils.IsError(err, \"outside allowable range\") {\n", "\t\t\tt.Fatalf(\"expected 'outside allowable range' error, but got %v\", err)\n", "\t\t}\n", "\t\tif err := job.NoTxn(...
// Copyright 2019 The Cockroach Authors. // // Use of this software is governed by the Business Source License // included in the file licenses/BSL.txt. // // As of the Change Date specified in that file, in accordance with // the Business Source License, use of this software will be governed // by the Apache License, ...
pkg/kv/kvserver/store_raft.go
0
https://github.com/cockroachdb/cockroach/commit/66345a5db9de739faf4edbbaaae4c606daaec03f
[ 0.0013638357631862164, 0.00018878096307162195, 0.00015969235391821712, 0.00017091147310566157, 0.0001362780312774703 ]
{ "id": 0, "code_window": [ "\tplannercore \"github.com/pingcap/tidb/planner/core\"\n", "\t\"github.com/pingcap/tidb/privilege\"\n", "\t\"github.com/pingcap/tidb/sessionctx\"\n", "\t\"github.com/pingcap/tidb/sessionctx/stmtctx\"\n", "\t\"github.com/pingcap/tidb/sessionctx/variable\"\n", "\tt...
// Copyright 2015 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
executor/executor.go
1
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.43725308775901794, 0.0028562454972416162, 0.00015899345453362912, 0.00017011139425449073, 0.03268544003367424 ]
{ "id": 0, "code_window": [ "\tplannercore \"github.com/pingcap/tidb/planner/core\"\n", "\t\"github.com/pingcap/tidb/privilege\"\n", "\t\"github.com/pingcap/tidb/sessionctx\"\n", "\t\"github.com/pingcap/tidb/sessionctx/stmtctx\"\n", "\t\"github.com/pingcap/tidb/sessionctx/variable\"\n", "\tt...
// Copyright 2019 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
util/math/math.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.0003184509987477213, 0.0001932269660755992, 0.00016481647617183626, 0.0001681147696217522, 0.00005609429717878811 ]
{ "id": 0, "code_window": [ "\tplannercore \"github.com/pingcap/tidb/planner/core\"\n", "\t\"github.com/pingcap/tidb/privilege\"\n", "\t\"github.com/pingcap/tidb/sessionctx\"\n", "\t\"github.com/pingcap/tidb/sessionctx/stmtctx\"\n", "\t\"github.com/pingcap/tidb/sessionctx/variable\"\n", "\tt...
// Copyright 2019 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
infoschema/metrics_schema_test.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.00024251776630990207, 0.00017986218153964728, 0.00016434647841379046, 0.00017030817980412394, 0.000025743593141669407 ]
{ "id": 0, "code_window": [ "\tplannercore \"github.com/pingcap/tidb/planner/core\"\n", "\t\"github.com/pingcap/tidb/privilege\"\n", "\t\"github.com/pingcap/tidb/sessionctx\"\n", "\t\"github.com/pingcap/tidb/sessionctx/stmtctx\"\n", "\t\"github.com/pingcap/tidb/sessionctx/variable\"\n", "\tt...
// Copyright 2018 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
owner/fail_test.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.0003185062378179282, 0.00019300471467431635, 0.0001649675687076524, 0.00017064613348338753, 0.00004728528074338101 ]
{ "id": 1, "code_window": [ "\t\t}\n", "\t\treturn nil\n", "\t}\n", "\tlockWaitTime := e.ctx.GetSessionVars().LockWaitTimeout\n", "\tif e.Lock.LockType == ast.SelectLockForUpdateNoWait {\n", "\t\tlockWaitTime = kv.LockNoWait\n", "\t} else if e.Lock.LockType == ast.SelectLockForUpdateWait...
// Copyright 2016 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
store/tikv/tests/2pc_test.go
1
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.9946107864379883, 0.056695520877838135, 0.00015923104365356266, 0.00017508516611997038, 0.20957262814044952 ]
{ "id": 1, "code_window": [ "\t\t}\n", "\t\treturn nil\n", "\t}\n", "\tlockWaitTime := e.ctx.GetSessionVars().LockWaitTimeout\n", "\tif e.Lock.LockType == ast.SelectLockForUpdateNoWait {\n", "\t\tlockWaitTime = kv.LockNoWait\n", "\t} else if e.Lock.LockType == ast.SelectLockForUpdateWait...
// Copyright 2021 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
statistics/row_sampler.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.00017921533435583115, 0.00017238316650036722, 0.00016509788110852242, 0.00017138931434601545, 0.000004327357146394206 ]
{ "id": 1, "code_window": [ "\t\t}\n", "\t\treturn nil\n", "\t}\n", "\tlockWaitTime := e.ctx.GetSessionVars().LockWaitTimeout\n", "\tif e.Lock.LockType == ast.SelectLockForUpdateNoWait {\n", "\t\tlockWaitTime = kv.LockNoWait\n", "\t} else if e.Lock.LockType == ast.SelectLockForUpdateWait...
// Copyright 2015 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
server/column.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.00019000869360752404, 0.00017540522094350308, 0.00016667216550558805, 0.00017692413530312479, 0.000006535798092954792 ]
{ "id": 1, "code_window": [ "\t\t}\n", "\t\treturn nil\n", "\t}\n", "\tlockWaitTime := e.ctx.GetSessionVars().LockWaitTimeout\n", "\tif e.Lock.LockType == ast.SelectLockForUpdateNoWait {\n", "\t\tlockWaitTime = kv.LockNoWait\n", "\t} else if e.Lock.LockType == ast.SelectLockForUpdateWait...
// Copyright 2018 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
metrics/distsql.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.00018015937530435622, 0.00017414268222637475, 0.0001660978450672701, 0.00017301557818427682, 0.000004595670361595694 ]
{ "id": 2, "code_window": [ "\tWaitScatterRegionFinish(ctx context.Context, regionID uint64, backOff int) error\n", "\tCheckRegionInScattering(regionID uint64) (bool, error)\n", "}\n", "\n", "// Used for pessimistic lock wait time\n", "// these two constants are special for lock protocol wit...
// Copyright 2018 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
planner/core/point_get_plan.go
1
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.012707462534308434, 0.00045391800813376904, 0.0001638281246414408, 0.00016925363161135465, 0.0015754676423966885 ]
{ "id": 2, "code_window": [ "\tWaitScatterRegionFinish(ctx context.Context, regionID uint64, backOff int) error\n", "\tCheckRegionInScattering(regionID uint64) (bool, error)\n", "}\n", "\n", "// Used for pessimistic lock wait time\n", "// these two constants are special for lock protocol wit...
// Copyright 2015 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
ddl/table_test.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.0007877504103817046, 0.00019090504792984575, 0.00016485185187775642, 0.00016987547860480845, 0.00009709104779176414 ]
{ "id": 2, "code_window": [ "\tWaitScatterRegionFinish(ctx context.Context, regionID uint64, backOff int) error\n", "\tCheckRegionInScattering(regionID uint64) (bool, error)\n", "}\n", "\n", "// Used for pessimistic lock wait time\n", "// these two constants are special for lock protocol wit...
// Copyright 2019 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
ddl/options_test.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.00017781989299692214, 0.00017236564599443227, 0.00016731690266169608, 0.00017211625527124852, 0.000003173599225192447 ]
{ "id": 2, "code_window": [ "\tWaitScatterRegionFinish(ctx context.Context, regionID uint64, backOff int) error\n", "\tCheckRegionInScattering(regionID uint64) (bool, error)\n", "}\n", "\n", "// Used for pessimistic lock wait time\n", "// these two constants are special for lock protocol wit...
// Copyright 2016 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
sessionctx/variable/varsutil_test.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.00031503327772952616, 0.00017251948884222656, 0.00016446183144580573, 0.00017007399583235383, 0.000018029293642030098 ]
{ "id": 3, "code_window": [ "\t\"github.com/pingcap/tidb/planner/property\"\n", "\t\"github.com/pingcap/tidb/privilege\"\n", "\t\"github.com/pingcap/tidb/sessionctx\"\n", "\t\"github.com/pingcap/tidb/sessionctx/stmtctx\"\n", "\t\"github.com/pingcap/tidb/table\"\n", "\t\"github.com/pingcap/ti...
// Copyright 2020 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
store/tikv/pessimistic.go
1
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.0006035302067175508, 0.00019331461226101965, 0.00016469175170641392, 0.00016955625324044377, 0.00008694911957718432 ]
{ "id": 3, "code_window": [ "\t\"github.com/pingcap/tidb/planner/property\"\n", "\t\"github.com/pingcap/tidb/privilege\"\n", "\t\"github.com/pingcap/tidb/sessionctx\"\n", "\t\"github.com/pingcap/tidb/sessionctx/stmtctx\"\n", "\t\"github.com/pingcap/tidb/table\"\n", "\t\"github.com/pingcap/ti...
// Copyright 2016 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
store/tikv/client_test.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.0002598641440272331, 0.00017382620717398822, 0.00016172627510968596, 0.00017140866839326918, 0.0000174014967342373 ]
{ "id": 3, "code_window": [ "\t\"github.com/pingcap/tidb/planner/property\"\n", "\t\"github.com/pingcap/tidb/privilege\"\n", "\t\"github.com/pingcap/tidb/sessionctx\"\n", "\t\"github.com/pingcap/tidb/sessionctx/stmtctx\"\n", "\t\"github.com/pingcap/tidb/table\"\n", "\t\"github.com/pingcap/ti...
// Copyright 2017 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
planner/core/find_best_task.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.0058073862455785275, 0.00023206137120723724, 0.0001612669148016721, 0.0001695999235380441, 0.000445679877884686 ]
{ "id": 3, "code_window": [ "\t\"github.com/pingcap/tidb/planner/property\"\n", "\t\"github.com/pingcap/tidb/privilege\"\n", "\t\"github.com/pingcap/tidb/sessionctx\"\n", "\t\"github.com/pingcap/tidb/sessionctx/stmtctx\"\n", "\t\"github.com/pingcap/tidb/table\"\n", "\t\"github.com/pingcap/ti...
# Proposal: Infer the System Timezone of a TiDB cluster via TZ environment variable - Author(s): [Zhexuan Yang](www.github.com/zhexuany) - Last updated: 2018/09/09 - Discussion at: Not applicable ## Abstract When it comes to time-related calculation, it is hard for the distributed system. This proposal tries to r...
docs/design/2018-09-10-adding-tz-env.md
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.00023084630083758384, 0.00017703959019854665, 0.000162969168741256, 0.00016704024164937437, 0.0000241946672758786 ]
{ "id": 4, "code_window": [ "\t\t\t\tlock = true\n", "\t\t\t\twaitTime = sessVars.LockWaitTimeout\n", "\t\t\t\tif lockInfo.LockType == ast.SelectLockForUpdateWaitN {\n", "\t\t\t\t\twaitTime = int64(lockInfo.WaitSec * 1000)\n", "\t\t\t\t} else if lockInfo.LockType == ast.SelectLockForUpdateNoWait...
// Copyright 2020 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
store/tikv/pessimistic.go
1
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.007973898202180862, 0.0013367527863010764, 0.0001623280404601246, 0.00017592048970982432, 0.0021019577980041504 ]
{ "id": 4, "code_window": [ "\t\t\t\tlock = true\n", "\t\t\t\twaitTime = sessVars.LockWaitTimeout\n", "\t\t\t\tif lockInfo.LockType == ast.SelectLockForUpdateWaitN {\n", "\t\t\t\t\twaitTime = int64(lockInfo.WaitSec * 1000)\n", "\t\t\t\t} else if lockInfo.LockType == ast.SelectLockForUpdateNoWait...
// Copyright 2018 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
planner/property/physical_property.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.00047920175711624324, 0.00018879806157201529, 0.00016199189121834934, 0.00017177368863485754, 0.000066527230956126 ]
{ "id": 4, "code_window": [ "\t\t\t\tlock = true\n", "\t\t\t\twaitTime = sessVars.LockWaitTimeout\n", "\t\t\t\tif lockInfo.LockType == ast.SelectLockForUpdateWaitN {\n", "\t\t\t\t\twaitTime = int64(lockInfo.WaitSec * 1000)\n", "\t\t\t\t} else if lockInfo.LockType == ast.SelectLockForUpdateNoWait...
// Copyright 2017 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
expression/builtin_miscellaneous_test.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.00017799154738895595, 0.00017161265714094043, 0.00016498849436175078, 0.00017174388631246984, 0.0000034694048736128025 ]
{ "id": 4, "code_window": [ "\t\t\t\tlock = true\n", "\t\t\t\twaitTime = sessVars.LockWaitTimeout\n", "\t\t\t\tif lockInfo.LockType == ast.SelectLockForUpdateWaitN {\n", "\t\t\t\t\twaitTime = int64(lockInfo.WaitSec * 1000)\n", "\t\t\t\t} else if lockInfo.LockType == ast.SelectLockForUpdateNoWait...
[ { "Name": "TestGroupNDVs", "Cases": [ { "SQL": "select count(1) from t1 group by a, b", "AggInput": "[{[1 2] 4}]", "JoinInput": "" }, { "SQL": "select * from t1, t2 where t1.a = t2.a and t1.b = t2.b", "AggInput": "", "JoinInput": "[{[5 6] 4}]...
planner/core/testdata/stats_suite_out.json
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.0001757070276653394, 0.00016986610717140138, 0.00016221044643316418, 0.00016952982696238905, 0.0000031013012176117627 ]
{ "id": 5, "code_window": [ "\n", "\t\"github.com/pingcap/errors\"\n", "\t\"github.com/pingcap/failpoint\"\n", "\tpb \"github.com/pingcap/kvproto/pkg/kvrpcpb\"\n", "\ttidbkv \"github.com/pingcap/tidb/kv\"\n", "\t\"github.com/pingcap/tidb/store/tikv/kv\"\n", "\t\"github.com/pingcap/tidb/s...
// Copyright 2016 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
store/tikv/tests/2pc_test.go
1
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.06128443777561188, 0.0013171621831133962, 0.00016257711104117334, 0.00017027434660121799, 0.007157760672271252 ]
{ "id": 5, "code_window": [ "\n", "\t\"github.com/pingcap/errors\"\n", "\t\"github.com/pingcap/failpoint\"\n", "\tpb \"github.com/pingcap/kvproto/pkg/kvrpcpb\"\n", "\ttidbkv \"github.com/pingcap/tidb/kv\"\n", "\t\"github.com/pingcap/tidb/store/tikv/kv\"\n", "\t\"github.com/pingcap/tidb/s...
// Copyright 2019 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
executor/joiner_test.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.0013809588272124529, 0.00028042710619047284, 0.0001650382182560861, 0.00016892296844162047, 0.0003480591403786093 ]
{ "id": 5, "code_window": [ "\n", "\t\"github.com/pingcap/errors\"\n", "\t\"github.com/pingcap/failpoint\"\n", "\tpb \"github.com/pingcap/kvproto/pkg/kvrpcpb\"\n", "\ttidbkv \"github.com/pingcap/tidb/kv\"\n", "\t\"github.com/pingcap/tidb/store/tikv/kv\"\n", "\t\"github.com/pingcap/tidb/s...
// Copyright 2019 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
planner/core/pb_to_plan.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.004351307637989521, 0.00036362395621836185, 0.00016515595780219883, 0.00017089216271415353, 0.0007460913620889187 ]
{ "id": 5, "code_window": [ "\n", "\t\"github.com/pingcap/errors\"\n", "\t\"github.com/pingcap/failpoint\"\n", "\tpb \"github.com/pingcap/kvproto/pkg/kvrpcpb\"\n", "\ttidbkv \"github.com/pingcap/tidb/kv\"\n", "\t\"github.com/pingcap/tidb/store/tikv/kv\"\n", "\t\"github.com/pingcap/tidb/s...
// Copyright 2015 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
privilege/privileges/privileges.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.0020751829724758863, 0.00022376514971256256, 0.00016295378736685961, 0.00016743180458433926, 0.00026593980146571994 ]
{ "id": 6, "code_window": [ "\t\"go.uber.org/zap\"\n", ")\n", "\n", "type actionPessimisticLock struct {\n", "\t*kv.LockCtx\n", "}\n", "type actionPessimisticRollback struct{}\n" ], "labels": [ "keep", "keep", "add", "keep", "keep", "keep", "keep" ], "...
// Copyright 2015 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
executor/executor.go
1
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.1788731813430786, 0.0012655509635806084, 0.00015925502520985901, 0.00016960017092060298, 0.013378902338445187 ]
{ "id": 6, "code_window": [ "\t\"go.uber.org/zap\"\n", ")\n", "\n", "type actionPessimisticLock struct {\n", "\t*kv.LockCtx\n", "}\n", "type actionPessimisticRollback struct{}\n" ], "labels": [ "keep", "keep", "add", "keep", "keep", "keep", "keep" ], "...
// Copyright 2019 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
executor/split.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.0021614455617964268, 0.00021339151135180146, 0.00016225701256189495, 0.00017019876395352185, 0.00023217161651700735 ]
{ "id": 6, "code_window": [ "\t\"go.uber.org/zap\"\n", ")\n", "\n", "type actionPessimisticLock struct {\n", "\t*kv.LockCtx\n", "}\n", "type actionPessimisticRollback struct{}\n" ], "labels": [ "keep", "keep", "add", "keep", "keep", "keep", "keep" ], "...
// Copyright 2018 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
util/tracing/util.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.00038030269206501544, 0.00020187089103274047, 0.0001675059029366821, 0.0001724036264931783, 0.00007289839413715526 ]
{ "id": 6, "code_window": [ "\t\"go.uber.org/zap\"\n", ")\n", "\n", "type actionPessimisticLock struct {\n", "\t*kv.LockCtx\n", "}\n", "type actionPessimisticRollback struct{}\n" ], "labels": [ "keep", "keep", "add", "keep", "keep", "keep", "keep" ], "...
use test; drop table if exists t; create table t(a bigint, b bigint); explain format = 'brief' insert into t values(1, 1); id estRows task access object operator info Insert N/A root N/A explain format = 'brief' insert into t select * from t; id estRows task access object operator info Insert N/A root N/A └─TableRead...
cmd/explaintest/r/explain-non-select-stmt.result
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.0001725765032460913, 0.0001711892691673711, 0.00016963786038104445, 0.00017135344387497753, 0.0000012052995543854195 ]
{ "id": 7, "code_window": [ "\t\tif action.LockWaitTime > 0 {\n", "\t\t\ttimeLeft := action.LockWaitTime - (time.Since(lockWaitStartTime)).Milliseconds()\n", "\t\t\tif timeLeft <= 0 {\n", "\t\t\t\treq.PessimisticLock().WaitTimeout = tidbkv.LockNoWait\n", "\t\t\t} else {\n", "\t\t\t\treq.Pess...
// Copyright 2016 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
store/tikv/tests/2pc_test.go
1
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.029534826055169106, 0.0011887848377227783, 0.00015463503950741142, 0.00017549589392729104, 0.003152347169816494 ]
{ "id": 7, "code_window": [ "\t\tif action.LockWaitTime > 0 {\n", "\t\t\ttimeLeft := action.LockWaitTime - (time.Since(lockWaitStartTime)).Milliseconds()\n", "\t\t\tif timeLeft <= 0 {\n", "\t\t\t\treq.PessimisticLock().WaitTimeout = tidbkv.LockNoWait\n", "\t\t\t} else {\n", "\t\t\t\treq.Pess...
// Copyright 2019 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
planner/core/rule_generate_column_substitute.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.00017757285968400538, 0.00017239544831681997, 0.00016364280600100756, 0.00017365628445986658, 0.0000040563481888966635 ]
{ "id": 7, "code_window": [ "\t\tif action.LockWaitTime > 0 {\n", "\t\t\ttimeLeft := action.LockWaitTime - (time.Since(lockWaitStartTime)).Milliseconds()\n", "\t\t\tif timeLeft <= 0 {\n", "\t\t\t\treq.PessimisticLock().WaitTimeout = tidbkv.LockNoWait\n", "\t\t\t} else {\n", "\t\t\t\treq.Pess...
// Copyright 2021 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
store/tikv/binlog.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.0001943202078109607, 0.00017884884437080473, 0.00017062968981917948, 0.00017522272537462413, 0.00000927628298086347 ]
{ "id": 7, "code_window": [ "\t\tif action.LockWaitTime > 0 {\n", "\t\t\ttimeLeft := action.LockWaitTime - (time.Since(lockWaitStartTime)).Milliseconds()\n", "\t\t\tif timeLeft <= 0 {\n", "\t\t\t\treq.PessimisticLock().WaitTimeout = tidbkv.LockNoWait\n", "\t\t\t} else {\n", "\t\t\t\treq.Pess...
package aggfuncs_test import ( . "github.com/pingcap/check" "github.com/pingcap/parser/ast" "github.com/pingcap/parser/mysql" ) func (s *testSuite) TestMergePartialResult4Varsamp(c *C) { tests := []aggTest{ buildAggTester(ast.AggFuncVarSamp, mysql.TypeDouble, 5, 2.5, 1, 1.9821428571428572), } for _, test := r...
executor/aggfuncs/func_varsamp_test.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.00017383246449753642, 0.00016479204350616783, 0.0001565217098686844, 0.0001640219270484522, 0.000007088035090418998 ]
{ "id": 8, "code_window": [ "\t\t}\n", "\n", "\t\t// If msBeforeTxnExpired is not zero, it means there are still locks blocking us acquiring\n", "\t\t// the pessimistic lock. We should return acquire fail with nowait set or timeout error if necessary.\n", "\t\tif msBeforeTxnExpired > 0 {\n", ...
// Copyright 2016 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
store/tikv/tests/2pc_test.go
1
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.028430163860321045, 0.001619641319848597, 0.0001588196464581415, 0.00017568461771588773, 0.003964218311011791 ]
{ "id": 8, "code_window": [ "\t\t}\n", "\n", "\t\t// If msBeforeTxnExpired is not zero, it means there are still locks blocking us acquiring\n", "\t\t// the pessimistic lock. We should return acquire fail with nowait set or timeout error if necessary.\n", "\t\tif msBeforeTxnExpired > 0 {\n", ...
// Copyright 2016 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
ddl/column_change_test.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.0009393073269166052, 0.00021616143931169063, 0.00016439944738522172, 0.00016897548630367965, 0.0001377723237965256 ]
{ "id": 8, "code_window": [ "\t\t}\n", "\n", "\t\t// If msBeforeTxnExpired is not zero, it means there are still locks blocking us acquiring\n", "\t\t// the pessimistic lock. We should return acquire fail with nowait set or timeout error if necessary.\n", "\t\tif msBeforeTxnExpired > 0 {\n", ...
// Copyright 2018 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
planner/memo/pattern.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.00045709279947914183, 0.00018641188216861337, 0.0001614336943021044, 0.0001698971027508378, 0.00006600518099730834 ]
{ "id": 8, "code_window": [ "\t\t}\n", "\n", "\t\t// If msBeforeTxnExpired is not zero, it means there are still locks blocking us acquiring\n", "\t\t// the pessimistic lock. We should return acquire fail with nowait set or timeout error if necessary.\n", "\t\tif msBeforeTxnExpired > 0 {\n", ...
// Copyright 2019 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
expression/builtin_compare_vec.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.0005174874677322805, 0.0001801868638722226, 0.00016528909327462316, 0.0001692358055151999, 0.00005211946336203255 ]
{ "id": 9, "code_window": [ "\t\t\t\treturn kv.ErrLockAcquireFailAndNoWaitSet\n", "\t\t\t} else if action.LockWaitTime == tidbkv.LockAlwaysWait {\n", "\t\t\t\t// do nothing but keep wait\n", "\t\t\t} else {\n", "\t\t\t\t// the lockWaitTime is set, we should return wait timeout if we are still bl...
// Copyright 2015 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
kv/kv.go
1
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.004006103612482548, 0.0004561881360132247, 0.00016196486831177026, 0.00017706707876641303, 0.0007461969507858157 ]
{ "id": 9, "code_window": [ "\t\t\t\treturn kv.ErrLockAcquireFailAndNoWaitSet\n", "\t\t\t} else if action.LockWaitTime == tidbkv.LockAlwaysWait {\n", "\t\t\t\t// do nothing but keep wait\n", "\t\t\t} else {\n", "\t\t\t\t// the lockWaitTime is set, we should return wait timeout if we are still bl...
// Copyright 2016 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
kv/interface_mock_test.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.003845575265586376, 0.0003102846385445446, 0.0001655373489484191, 0.0001677577820373699, 0.000693623733241111 ]
{ "id": 9, "code_window": [ "\t\t\t\treturn kv.ErrLockAcquireFailAndNoWaitSet\n", "\t\t\t} else if action.LockWaitTime == tidbkv.LockAlwaysWait {\n", "\t\t\t\t// do nothing but keep wait\n", "\t\t\t} else {\n", "\t\t\t\t// the lockWaitTime is set, we should return wait timeout if we are still bl...
// Copyright 2019 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
expression/builtin_op_vec.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.00017710041720420122, 0.0001703517191344872, 0.0001642487186472863, 0.0001707945193629712, 0.000002818370830937056 ]
{ "id": 9, "code_window": [ "\t\t\t\treturn kv.ErrLockAcquireFailAndNoWaitSet\n", "\t\t\t} else if action.LockWaitTime == tidbkv.LockAlwaysWait {\n", "\t\t\t\t// do nothing but keep wait\n", "\t\t\t} else {\n", "\t\t\t\t// the lockWaitTime is set, we should return wait timeout if we are still bl...
// Copyright 2016 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
store/copr/coprocessor.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.0021431248169392347, 0.00019134278409183025, 0.0001615733781363815, 0.0001676791434874758, 0.0001816115836845711 ]
{ "id": 10, "code_window": [ "\ttxn2.SetOption(kv.Pessimistic, true)\n", "\n", "\t// test no wait\n", "\tlockCtx = &kv.LockCtx{ForUpdateTS: txn2.StartTS(), LockWaitTime: tidbkv.LockNoWait, WaitStartTime: time.Now()}\n", "\terr = txn2.LockKeys(context.Background(), lockCtx, k2)\n", "\t// cann...
// Copyright 2016 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
store/tikv/tests/2pc_test.go
1
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.9971144199371338, 0.06642968952655792, 0.00015946228813845664, 0.0017117704264819622, 0.226938858628273 ]
{ "id": 10, "code_window": [ "\ttxn2.SetOption(kv.Pessimistic, true)\n", "\n", "\t// test no wait\n", "\tlockCtx = &kv.LockCtx{ForUpdateTS: txn2.StartTS(), LockWaitTime: tidbkv.LockNoWait, WaitStartTime: time.Now()}\n", "\terr = txn2.LockKeys(context.Background(), lockCtx, k2)\n", "\t// cann...
// Copyright 2019 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
executor/aggfuncs/func_rank.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.0001785891072358936, 0.00017433382163289934, 0.00016698235413059592, 0.00017535907682031393, 0.0000033659230211924296 ]
{ "id": 10, "code_window": [ "\ttxn2.SetOption(kv.Pessimistic, true)\n", "\n", "\t// test no wait\n", "\tlockCtx = &kv.LockCtx{ForUpdateTS: txn2.StartTS(), LockWaitTime: tidbkv.LockNoWait, WaitStartTime: time.Now()}\n", "\terr = txn2.LockKeys(context.Background(), lockCtx, k2)\n", "\t// cann...
// Copyright 2019 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
store/mockstore/unistore/tikv/detector_test.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.0013548422139137983, 0.0003758665407076478, 0.0001630008773645386, 0.0001765798806445673, 0.0003920110175386071 ]
{ "id": 10, "code_window": [ "\ttxn2.SetOption(kv.Pessimistic, true)\n", "\n", "\t// test no wait\n", "\tlockCtx = &kv.LockCtx{ForUpdateTS: txn2.StartTS(), LockWaitTime: tidbkv.LockNoWait, WaitStartTime: time.Now()}\n", "\terr = txn2.LockKeys(context.Background(), lockCtx, k2)\n", "\t// cann...
# Proposal: Support SQL Plan Management - Author(s): [Haibin Xie](https://github.com/lamxTyler) - Last updated: 2018-12-11 - Discussion at: ## Abstract This proposal aims to support the SQL plan management. With the help of it, we can force the optimizer to choose a certain plan without modifying the SQL text. ## B...
docs/design/2018-12-11-sql-plan-management.md
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.00017393376037944108, 0.00016859894094523042, 0.00016372036770917475, 0.0001685816387180239, 0.0000038667603803332895 ]
{ "id": 11, "code_window": [ "\t// case, the returned action of TxnStatus should be LockNotExistDoNothing, and lock on k3 could be resolved.\n", "\ttxn3 := s.begin(c)\n", "\ttxn3.SetOption(kv.Pessimistic, true)\n", "\tlockCtx = &kv.LockCtx{ForUpdateTS: txn3.StartTS(), WaitStartTime: time.Now(), Lock...
// Copyright 2020 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
store/tikv/pessimistic.go
1
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.9982340335845947, 0.06943465769290924, 0.00016459802282042801, 0.0016376792918890715, 0.23564420640468597 ]
{ "id": 11, "code_window": [ "\t// case, the returned action of TxnStatus should be LockNotExistDoNothing, and lock on k3 could be resolved.\n", "\ttxn3 := s.begin(c)\n", "\ttxn3.SetOption(kv.Pessimistic, true)\n", "\tlockCtx = &kv.LockCtx{ForUpdateTS: txn3.StartTS(), WaitStartTime: time.Now(), Lock...
// Copyright 2016 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
executor/explain.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.00017584161832928658, 0.00017070345347747207, 0.0001616804802324623, 0.00017080141697078943, 0.000003592185748857446 ]
{ "id": 11, "code_window": [ "\t// case, the returned action of TxnStatus should be LockNotExistDoNothing, and lock on k3 could be resolved.\n", "\ttxn3 := s.begin(c)\n", "\ttxn3.SetOption(kv.Pessimistic, true)\n", "\tlockCtx = &kv.LockCtx{ForUpdateTS: txn3.StartTS(), WaitStartTime: time.Now(), Lock...
// Copyright 2016 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
tablecodec/bench_test.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.00017673215188551694, 0.00017094776558224112, 0.00016529492859262973, 0.00017053060582838953, 0.000004236709628457902 ]
{ "id": 11, "code_window": [ "\t// case, the returned action of TxnStatus should be LockNotExistDoNothing, and lock on k3 could be resolved.\n", "\ttxn3 := s.begin(c)\n", "\ttxn3.SetOption(kv.Pessimistic, true)\n", "\tlockCtx = &kv.LockCtx{ForUpdateTS: txn3.StartTS(), WaitStartTime: time.Now(), Lock...
// Copyright 2018 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
server/statistics_handler.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.00017627724446356297, 0.00016701752610970289, 0.00015980811440385878, 0.0001662819558987394, 0.000005443811005534371 ]
{ "id": 12, "code_window": [ "\t// txn3 should locks k2 successfully using no wait\n", "\ttxn3 := s.begin(c)\n", "\ttxn3.SetOption(kv.Pessimistic, true)\n", "\tlockCtx3 := &kv.LockCtx{ForUpdateTS: txn3.StartTS(), WaitStartTime: time.Now(), LockWaitTime: tidbkv.LockNoWait}\n", "\tc.Assert(failpoi...
// Copyright 2018 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
planner/core/point_get_plan.go
1
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.00546275544911623, 0.0002928764733951539, 0.00016036925080697984, 0.00017033253971021622, 0.0006944581400603056 ]
{ "id": 12, "code_window": [ "\t// txn3 should locks k2 successfully using no wait\n", "\ttxn3 := s.begin(c)\n", "\ttxn3.SetOption(kv.Pessimistic, true)\n", "\tlockCtx3 := &kv.LockCtx{ForUpdateTS: txn3.StartTS(), WaitStartTime: time.Now(), LockWaitTime: tidbkv.LockNoWait}\n", "\tc.Assert(failpoi...
// Copyright 2017 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
types/json/binary_functions.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.004021415952593088, 0.0002402742247795686, 0.00015933097165543586, 0.00017207738710567355, 0.0004257624677848071 ]
{ "id": 12, "code_window": [ "\t// txn3 should locks k2 successfully using no wait\n", "\ttxn3 := s.begin(c)\n", "\ttxn3.SetOption(kv.Pessimistic, true)\n", "\tlockCtx3 := &kv.LockCtx{ForUpdateTS: txn3.StartTS(), WaitStartTime: time.Now(), LockWaitTime: tidbkv.LockNoWait}\n", "\tc.Assert(failpoi...
// Copyright 2019 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
executor/index_lookup_hash_join.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.0006778444512747228, 0.000191274841199629, 0.00015970284584909678, 0.00017035877681337297, 0.00007493905286537483 ]
{ "id": 12, "code_window": [ "\t// txn3 should locks k2 successfully using no wait\n", "\ttxn3 := s.begin(c)\n", "\ttxn3.SetOption(kv.Pessimistic, true)\n", "\tlockCtx3 := &kv.LockCtx{ForUpdateTS: txn3.StartTS(), WaitStartTime: time.Now(), LockWaitTime: tidbkv.LockNoWait}\n", "\tc.Assert(failpoi...
// Copyright 2019 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
executor/chunk_size_control_test.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.0008682208135724068, 0.0002675493306014687, 0.00016193490591831505, 0.00017065447173081338, 0.0002060737751889974 ]
{ "id": 13, "code_window": [ "\tc.Assert(tablecodec.IsUntouchedIndexKValue(untouchedIndexKey, untouchedIndexValue), IsTrue)\n", "\ttxn := s.begin(c)\n", "\ttxn.SetOption(kv.KVFilter, drivertxn.TiDBKVFilter{})\n", "\terr := txn.Set(untouchedIndexKey, untouchedIndexValue)\n", "\tc.Assert(err, IsNi...
// Copyright 2016 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
store/tikv/tests/2pc_test.go
1
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.9964742064476013, 0.11461545526981354, 0.00016306850011460483, 0.0028647775761783123, 0.30311423540115356 ]
{ "id": 13, "code_window": [ "\tc.Assert(tablecodec.IsUntouchedIndexKValue(untouchedIndexKey, untouchedIndexValue), IsTrue)\n", "\ttxn := s.begin(c)\n", "\ttxn.SetOption(kv.KVFilter, drivertxn.TiDBKVFilter{})\n", "\terr := txn.Set(untouchedIndexKey, untouchedIndexValue)\n", "\tc.Assert(err, IsNi...
// Copyright 2018 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
executor/aggfuncs/func_sum.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.00017956084047909826, 0.0001717292907414958, 0.000161972435307689, 0.0001727309136185795, 0.000004168552095507039 ]
{ "id": 13, "code_window": [ "\tc.Assert(tablecodec.IsUntouchedIndexKValue(untouchedIndexKey, untouchedIndexValue), IsTrue)\n", "\ttxn := s.begin(c)\n", "\ttxn.SetOption(kv.KVFilter, drivertxn.TiDBKVFilter{})\n", "\terr := txn.Set(untouchedIndexKey, untouchedIndexValue)\n", "\tc.Assert(err, IsNi...
// Copyright 2020 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
store/tikv/tests/prewrite_test.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.015491497702896595, 0.003991842269897461, 0.00016453697753604501, 0.000585904810577631, 0.005343107506632805 ]
{ "id": 13, "code_window": [ "\tc.Assert(tablecodec.IsUntouchedIndexKValue(untouchedIndexKey, untouchedIndexValue), IsTrue)\n", "\ttxn := s.begin(c)\n", "\ttxn.SetOption(kv.KVFilter, drivertxn.TiDBKVFilter{})\n", "\terr := txn.Set(untouchedIndexKey, untouchedIndexValue)\n", "\tc.Assert(err, IsNi...
// Copyright 2019 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
executor/executor_required_rows_test.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.0005812495364807546, 0.00017827814735937864, 0.00015995507419575006, 0.00017323432257398963, 0.00004319563595345244 ]
{ "id": 14, "code_window": [ "\tc.Assert(err, IsNil)\n", "\n", "\t// txn2 tries to lock the pessimisticLockKey, the lock should has been resolved in clean whole region resolve\n", "\ttxn2 := s.begin(c)\n", "\ttxn2.SetOption(kv.Pessimistic, true)\n", "\tlockCtx = &kv.LockCtx{ForUpdateTS: txn2...
// Copyright 2020 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
store/tikv/pessimistic.go
1
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.9961333274841309, 0.0791531354188919, 0.00016625328862573951, 0.0017475866479799151, 0.26115596294403076 ]
{ "id": 14, "code_window": [ "\tc.Assert(err, IsNil)\n", "\n", "\t// txn2 tries to lock the pessimisticLockKey, the lock should has been resolved in clean whole region resolve\n", "\ttxn2 := s.begin(c)\n", "\ttxn2.SetOption(kv.Pessimistic, true)\n", "\tlockCtx = &kv.LockCtx{ForUpdateTS: txn2...
// Copyright 2019-present PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agr...
store/mockstore/unistore/tikv/deadlock.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.0016289768973365426, 0.00024074746761471033, 0.00016063294606283307, 0.0001653367216931656, 0.000293341203359887 ]
{ "id": 14, "code_window": [ "\tc.Assert(err, IsNil)\n", "\n", "\t// txn2 tries to lock the pessimisticLockKey, the lock should has been resolved in clean whole region resolve\n", "\ttxn2 := s.begin(c)\n", "\ttxn2.SetOption(kv.Pessimistic, true)\n", "\tlockCtx = &kv.LockCtx{ForUpdateTS: txn2...
// Copyright 2017 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
util/chunk/list_test.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.000176350207766518, 0.00017117775860242546, 0.0001596695074113086, 0.00017256494902539998, 0.000004564097707770998 ]
{ "id": 14, "code_window": [ "\tc.Assert(err, IsNil)\n", "\n", "\t// txn2 tries to lock the pessimisticLockKey, the lock should has been resolved in clean whole region resolve\n", "\ttxn2 := s.begin(c)\n", "\ttxn2.SetOption(kv.Pessimistic, true)\n", "\tlockCtx = &kv.LockCtx{ForUpdateTS: txn2...
// Copyright 2020 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
telemetry/data_cluster_hardware_test.go
0
https://github.com/pingcap/tidb/commit/c25042543ad6496849ba7547f81b2f0a986d35cd
[ 0.0019409401575103402, 0.00046390146599151194, 0.00016205167048610747, 0.0001694361853878945, 0.0006605659727938473 ]
{ "id": 0, "code_window": [ "\n", "func (s *DryRunnableStorage) GuaranteedUpdate(\n", "\tctx context.Context, key string, ptrToType runtime.Object, ignoreNotFound bool,\n", "\tpreconditions *storage.Preconditions, tryUpdate storage.UpdateFunc, dryRun bool, suggestion runtime.Object) error {\n", ...
/* Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go
1
https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
[ 0.9905785918235779, 0.06824507564306259, 0.0001657162792980671, 0.00044796805013902485, 0.22530190646648407 ]
{ "id": 0, "code_window": [ "\n", "func (s *DryRunnableStorage) GuaranteedUpdate(\n", "\tctx context.Context, key string, ptrToType runtime.Object, ignoreNotFound bool,\n", "\tpreconditions *storage.Preconditions, tryUpdate storage.UpdateFunc, dryRun bool, suggestion runtime.Object) error {\n", ...
// +build !ignore_autogenerated /* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable l...
pkg/controller/ttlafterfinished/config/v1alpha1/zz_generated.deepcopy.go
0
https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
[ 0.00017636636039242148, 0.0001733401441015303, 0.00016923800285439938, 0.00017441605450585485, 0.0000030079411317274207 ]
{ "id": 0, "code_window": [ "\n", "func (s *DryRunnableStorage) GuaranteedUpdate(\n", "\tctx context.Context, key string, ptrToType runtime.Object, ignoreNotFound bool,\n", "\tpreconditions *storage.Preconditions, tryUpdate storage.UpdateFunc, dryRun bool, suggestion runtime.Object) error {\n", ...
/* Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
staging/src/k8s.io/client-go/kubernetes/import.go
0
https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
[ 0.00017757488240022212, 0.0001767890207702294, 0.00017600315914023668, 0.0001767890207702294, 7.858616299927235e-7 ]
{ "id": 0, "code_window": [ "\n", "func (s *DryRunnableStorage) GuaranteedUpdate(\n", "\tctx context.Context, key string, ptrToType runtime.Object, ignoreNotFound bool,\n", "\tpreconditions *storage.Preconditions, tryUpdate storage.UpdateFunc, dryRun bool, suggestion runtime.Object) error {\n", ...
/* Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
staging/src/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/doc.go
0
https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
[ 0.0001775466080289334, 0.00017461308743804693, 0.00017087471496779472, 0.00017541793931741267, 0.0000027826101813843707 ]
{ "id": 1, "code_window": [ "\t\t}\n", "\t\treturn s.copyInto(out, ptrToType)\n", "\t}\n", "\treturn s.Storage.GuaranteedUpdate(ctx, key, ptrToType, ignoreNotFound, preconditions, tryUpdate, suggestion)\n", "}\n", "\n", "func (s *DryRunnableStorage) Count(key string) (int64, error) {\n",...
/* Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go
1
https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
[ 0.9828007221221924, 0.07793749868869781, 0.00016616849461570382, 0.0004884222289547324, 0.24094758927822113 ]
{ "id": 1, "code_window": [ "\t\t}\n", "\t\treturn s.copyInto(out, ptrToType)\n", "\t}\n", "\treturn s.Storage.GuaranteedUpdate(ctx, key, ptrToType, ignoreNotFound, preconditions, tryUpdate, suggestion)\n", "}\n", "\n", "func (s *DryRunnableStorage) Count(key string) (int64, error) {\n",...
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", srcs = [ "top.go", "top_node.go", "top_pod.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/kubectl/pkg/cmd/top", importpath = "k8s.io/kubectl/pkg/cmd/top", visib...
staging/src/k8s.io/kubectl/pkg/cmd/top/BUILD
0
https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
[ 0.00017414950707461685, 0.0001717088307486847, 0.00016940395289566368, 0.00017157661204691976, 0.0000016354636045434745 ]
{ "id": 1, "code_window": [ "\t\t}\n", "\t\treturn s.copyInto(out, ptrToType)\n", "\t}\n", "\treturn s.Storage.GuaranteedUpdate(ctx, key, ptrToType, ignoreNotFound, preconditions, tryUpdate, suggestion)\n", "}\n", "\n", "func (s *DryRunnableStorage) Count(key string) (int64, error) {\n",...
#!/usr/bin/env bash # Copyright 2018 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
hack/verify-spelling.sh
0
https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
[ 0.00017592495714779943, 0.00017082503472920507, 0.00016445948858745396, 0.00017088971799239516, 0.000004196175723336637 ]
{ "id": 1, "code_window": [ "\t\t}\n", "\t\treturn s.copyInto(out, ptrToType)\n", "\t}\n", "\treturn s.Storage.GuaranteedUpdate(ctx, key, ptrToType, ignoreNotFound, preconditions, tryUpdate, suggestion)\n", "}\n", "\n", "func (s *DryRunnableStorage) Count(key string) (int64, error) {\n",...
/* Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
staging/src/k8s.io/apiserver/pkg/endpoints/audit_test.go
0
https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
[ 0.0028006993234157562, 0.00032055345945991576, 0.00016616152424830943, 0.00017263839254155755, 0.0004925202811136842 ]
{ "id": 2, "code_window": [ "\t// Ignore the suggestion and try to pass down the current version of the object\n", "\t// read from cache.\n", "\tif elem, exists, err := c.watchCache.GetByKey(key); err != nil {\n", "\t\tklog.Errorf(\"GetByKey returned error: %v\", err)\n", "\t} else if exists {\n...
/* Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
staging/src/k8s.io/apiserver/pkg/storage/interfaces.go
1
https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
[ 0.006996996700763702, 0.0010435095755383372, 0.00016256378148682415, 0.0002643852785695344, 0.0015962996985763311 ]
{ "id": 2, "code_window": [ "\t// Ignore the suggestion and try to pass down the current version of the object\n", "\t// read from cache.\n", "\tif elem, exists, err := c.watchCache.GetByKey(key); err != nil {\n", "\t\tklog.Errorf(\"GetByKey returned error: %v\", err)\n", "\t} else if exists {\n...
load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = [ "doc.go", "generated_expansion.go", "node_client.go", "runtimeclass.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1", ...
staging/src/k8s.io/client-go/kubernetes/typed/node/v1alpha1/BUILD
0
https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
[ 0.00017477566143497825, 0.00017197620763909072, 0.00016899402544368058, 0.00017206757911480963, 0.000002429128244330059 ]
{ "id": 2, "code_window": [ "\t// Ignore the suggestion and try to pass down the current version of the object\n", "\t// read from cache.\n", "\tif elem, exists, err := c.watchCache.GetByKey(key); err != nil {\n", "\t\tklog.Errorf(\"GetByKey returned error: %v\", err)\n", "\t} else if exists {\n...
package request import ( "fmt" "strings" ) // A Handlers provides a collection of request handlers for various // stages of handling requests. type Handlers struct { Validate HandlerList Build HandlerList BuildStream HandlerList Sign HandlerList Send HandlerList ...
vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go
0
https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
[ 0.0029883375391364098, 0.0002763308584690094, 0.00016176282952073961, 0.00017111292982008308, 0.0004869971890002489 ]
{ "id": 2, "code_window": [ "\t// Ignore the suggestion and try to pass down the current version of the object\n", "\t// read from cache.\n", "\tif elem, exists, err := c.watchCache.GetByKey(key); err != nil {\n", "\t\tklog.Errorf(\"GetByKey returned error: %v\", err)\n", "\t} else if exists {\n...
/* Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
cmd/kubeadm/app/util/template.go
0
https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
[ 0.0001778663572622463, 0.0001716518308967352, 0.00016415743448305875, 0.00017229175136890262, 0.000006174402642500354 ]
{ "id": 3, "code_window": [ "// GuaranteedUpdate implements storage.Interface.GuaranteedUpdate.\n", "func (s *store) GuaranteedUpdate(\n", "\tctx context.Context, key string, out runtime.Object, ignoreNotFound bool,\n", "\tpreconditions *storage.Preconditions, tryUpdate storage.UpdateFunc, suggestio...
/* Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go
1
https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
[ 0.9987723231315613, 0.03194223716855049, 0.00016063617658801377, 0.0001701468718238175, 0.16151180863380432 ]
{ "id": 3, "code_window": [ "// GuaranteedUpdate implements storage.Interface.GuaranteedUpdate.\n", "func (s *store) GuaranteedUpdate(\n", "\tctx context.Context, key string, out runtime.Object, ignoreNotFound bool,\n", "\tpreconditions *storage.Preconditions, tryUpdate storage.UpdateFunc, suggestio...
/* * HCS API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 2.4 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package hcsschema type ContainerCredentialGuardInstance struct { Id s...
vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_instance.go
0
https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
[ 0.00017222716996911913, 0.00017007665883284062, 0.0001679261476965621, 0.00017007665883284062, 0.00000215051113627851 ]
{ "id": 3, "code_window": [ "// GuaranteedUpdate implements storage.Interface.GuaranteedUpdate.\n", "func (s *store) GuaranteedUpdate(\n", "\tctx context.Context, key string, out runtime.Object, ignoreNotFound bool,\n", "\tpreconditions *storage.Preconditions, tryUpdate storage.UpdateFunc, suggestio...
apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: name: globalnetworksets.crd.projectcalico.org labels: addonmanager.kubernetes.io/mode: Reconcile spec: scope: Cluster group: crd.projectcalico.org version: v1 names: kind: GlobalNetworkSet plural: globalnetworksets...
cluster/addons/calico-policy-controller/globalnetworksets-crd.yaml
0
https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
[ 0.00017538733663968742, 0.00017325038788840175, 0.00017111342458520085, 0.00017325038788840175, 0.0000021369560272432864 ]
{ "id": 3, "code_window": [ "// GuaranteedUpdate implements storage.Interface.GuaranteedUpdate.\n", "func (s *store) GuaranteedUpdate(\n", "\tctx context.Context, key string, out runtime.Object, ignoreNotFound bool,\n", "\tpreconditions *storage.Preconditions, tryUpdate storage.UpdateFunc, suggestio...
/* Package restful , a lean package for creating REST-style WebServices without magic. WebServices and Routes A WebService has a collection of Route objects that dispatch incoming Http Requests to a function calls. Typically, a WebService has a root path (e.g. /users) and defines common MIME types for its routes. Web...
vendor/github.com/emicklei/go-restful/doc.go
0
https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
[ 0.00022243968851398677, 0.00017067378212232143, 0.00015956556308083236, 0.00016865661018528044, 0.000013095984286337625 ]
{ "id": 4, "code_window": [ "\t\t}\n", "\t\treturn s.getState(getResp, key, v, ignoreNotFound)\n", "\t}\n", "\n", "\tvar origState *objState\n", "\tvar mustCheckData bool\n", "\tif suggestion != nil {\n", "\t\torigState, err = s.getStateFromObject(suggestion)\n", "\t\tmustCheckDa...
/* Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go
1
https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
[ 0.029796086251735687, 0.0005797585472464561, 0.00016031175618991256, 0.00017259264132007957, 0.003221148857846856 ]
{ "id": 4, "code_window": [ "\t\t}\n", "\t\treturn s.getState(getResp, key, v, ignoreNotFound)\n", "\t}\n", "\n", "\tvar origState *objState\n", "\tvar mustCheckData bool\n", "\tif suggestion != nil {\n", "\t\torigState, err = s.getStateFromObject(suggestion)\n", "\t\tmustCheckDa...
/* Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
pkg/registry/apps/rest/storage_apps.go
0
https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
[ 0.00030112636159174144, 0.00018380001711193472, 0.00015911765513010323, 0.0001729057403281331, 0.00003745127105503343 ]
{ "id": 4, "code_window": [ "\t\t}\n", "\t\treturn s.getState(getResp, key, v, ignoreNotFound)\n", "\t}\n", "\n", "\tvar origState *objState\n", "\tvar mustCheckData bool\n", "\tif suggestion != nil {\n", "\t\torigState, err = s.getStateFromObject(suggestion)\n", "\t\tmustCheckDa...
/* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softw...
staging/src/k8s.io/client-go/informers/extensions/v1beta1/networkpolicy.go
0
https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
[ 0.00018762612307909876, 0.00017531556659378111, 0.00016912103455979377, 0.00017433418543078005, 0.000005169208179722773 ]
{ "id": 4, "code_window": [ "\t\t}\n", "\t\treturn s.getState(getResp, key, v, ignoreNotFound)\n", "\t}\n", "\n", "\tvar origState *objState\n", "\tvar mustCheckData bool\n", "\tif suggestion != nil {\n", "\t\torigState, err = s.getStateFromObject(suggestion)\n", "\t\tmustCheckDa...
= vendor/github.com/go-openapi/swag licensed under: = Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall...
LICENSES/vendor/github.com/go-openapi/swag/LICENSE
0
https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
[ 0.00018060860747937113, 0.0001766009081620723, 0.00016785573097877204, 0.0001769783702911809, 0.0000028033343824063195 ]
{ "id": 5, "code_window": [ "\t} else {\n", "\t\torigState, err = getCurrentState()\n", "\t}\n", "\tif err != nil {\n", "\t\treturn err\n" ], "labels": [ "keep", "add", "keep", "keep", "keep" ], "after_edit": [ "\t\torigStateIsCurrent = true\n" ], "file_path":...
/* Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go
1
https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
[ 0.9986299276351929, 0.14571793377399445, 0.00016466820670757443, 0.00035331075196154416, 0.3433558940887451 ]
{ "id": 5, "code_window": [ "\t} else {\n", "\t\torigState, err = getCurrentState()\n", "\t}\n", "\tif err != nil {\n", "\t\treturn err\n" ], "labels": [ "keep", "add", "keep", "keep", "keep" ], "after_edit": [ "\t\torigStateIsCurrent = true\n" ], "file_path":...
{% panel style="success", title="Providing Feedback" %} **Provide feedback at the [survey](https://www.surveymonkey.com/r/JH35X82)** {% endpanel %} {% panel style="warning", title="Experimental" %} **Content in this chapter is experimental and will evolve based on user feedback.** Leave feedback on the conventions by...
staging/src/k8s.io/kubectl/docs/book/pages/app_composition_and_deployment/publishing_bases.md
0
https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
[ 0.00017353634757455438, 0.00016962856170721352, 0.00016350398072972894, 0.00016971610602922738, 0.000003190289817212033 ]
{ "id": 5, "code_window": [ "\t} else {\n", "\t\torigState, err = getCurrentState()\n", "\t}\n", "\tif err != nil {\n", "\t\treturn err\n" ], "labels": [ "keep", "add", "keep", "keep", "keep" ], "after_edit": [ "\t\torigStateIsCurrent = true\n" ], "file_path":...
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
pkg/registry/core/pod/storage/eviction_test.go
0
https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
[ 0.05894804000854492, 0.0015231958823278546, 0.0001654524530749768, 0.00016888391110114753, 0.007665134500712156 ]
{ "id": 5, "code_window": [ "\t} else {\n", "\t\torigState, err = getCurrentState()\n", "\t}\n", "\tif err != nil {\n", "\t\treturn err\n" ], "labels": [ "keep", "add", "keep", "keep", "keep" ], "after_edit": [ "\t\torigStateIsCurrent = true\n" ], "file_path":...
package godirwalk // ReadDirents returns a sortable slice of pointers to Dirent structures, each // representing the file system name and mode type for one of the immediate // descendant of the specified directory. If the specified directory is a // symbolic link, it will be resolved. // // If an optional scratch buff...
vendor/github.com/karrick/godirwalk/readdir.go
0
https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
[ 0.0003243365790694952, 0.00021505076438188553, 0.00016492226859554648, 0.00018079084111377597, 0.00006199338531587273 ]
{ "id": 6, "code_window": [ "\ttransformContext := authenticatedDataString(key)\n", "\tfor {\n", "\t\tif err := preconditions.Check(key, origState.obj); err != nil {\n", "\t\t\t// If our data is already up to date, return the error\n", "\t\t\tif !mustCheckData {\n", "\t\t\t\treturn err\n", ...
/* Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
staging/src/k8s.io/apiserver/pkg/storage/interfaces.go
1
https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
[ 0.006535582710057497, 0.0006754786008968949, 0.0001630826445762068, 0.00017840240616351366, 0.0012344014830887318 ]
{ "id": 6, "code_window": [ "\ttransformContext := authenticatedDataString(key)\n", "\tfor {\n", "\t\tif err := preconditions.Check(key, origState.obj); err != nil {\n", "\t\t\t// If our data is already up to date, return the error\n", "\t\t\tif !mustCheckData {\n", "\t\t\t\treturn err\n", ...
/* Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
pkg/volume/iscsi/doc.go
0
https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
[ 0.00017985899467021227, 0.00017771084094420075, 0.000175562672666274, 0.00017771084094420075, 0.000002148161001969129 ]
{ "id": 6, "code_window": [ "\ttransformContext := authenticatedDataString(key)\n", "\tfor {\n", "\t\tif err := preconditions.Check(key, origState.obj); err != nil {\n", "\t\t\t// If our data is already up to date, return the error\n", "\t\t\tif !mustCheckData {\n", "\t\t\t\treturn err\n", ...
load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = ["kubectl_utils.go"], importpath = "k8s.io/kubernetes/test/e2e/framework/kubectl", visibility = ["//visibility:public"], deps = [ "//staging/src/k8s.io/api/core/v1:go_default_library", ...
test/e2e/framework/kubectl/BUILD
0
https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
[ 0.0001772720570443198, 0.0001757079007802531, 0.00017448609287384897, 0.00017553672660142183, 0.0000010916596693277825 ]
{ "id": 6, "code_window": [ "\ttransformContext := authenticatedDataString(key)\n", "\tfor {\n", "\t\tif err := preconditions.Check(key, origState.obj); err != nil {\n", "\t\t\t// If our data is already up to date, return the error\n", "\t\t\tif !mustCheckData {\n", "\t\t\t\treturn err\n", ...
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build linux // +build mips mipsle package unix import ( "syscall" "unsafe" ) func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 ui...
vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
0
https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
[ 0.00020404627139214426, 0.0001724958565318957, 0.00016489838890265673, 0.00017019610095303506, 0.000007863399332563858 ]
{ "id": 7, "code_window": [ "\t\t\tif err != nil {\n", "\t\t\t\treturn err\n", "\t\t\t}\n", "\t\t\tmustCheckData = false\n", "\t\t\t// Retry\n", "\t\t\tcontinue\n", "\t\t}\n", "\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep...
/* Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go
1
https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
[ 0.981941819190979, 0.02166721597313881, 0.00016181713726837188, 0.00017134868539869785, 0.13724325597286224 ]
{ "id": 7, "code_window": [ "\t\t\tif err != nil {\n", "\t\t\t\treturn err\n", "\t\t\t}\n", "\t\t\tmustCheckData = false\n", "\t\t\t// Retry\n", "\t\t\tcontinue\n", "\t\t}\n", "\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep...
// Copyright 2015 The etcd Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed t...
vendor/go.etcd.io/etcd/etcdserver/util.go
0
https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
[ 0.002099506091326475, 0.00033175176940858364, 0.00016686711751390249, 0.00017296230362262577, 0.0004258572880644351 ]
{ "id": 7, "code_window": [ "\t\t\tif err != nil {\n", "\t\t\t\treturn err\n", "\t\t\t}\n", "\t\t\tmustCheckData = false\n", "\t\t\t// Retry\n", "\t\t\tcontinue\n", "\t\t}\n", "\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep...
// Copyright 2018 The Prometheus Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to...
vendor/github.com/prometheus/procfs/internal/util/sysreadfile.go
0
https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
[ 0.0004619703395292163, 0.00028594073955900967, 0.00016606553981546313, 0.00017723269411362708, 0.00013815853162668645 ]
{ "id": 7, "code_window": [ "\t\t\tif err != nil {\n", "\t\t\t\treturn err\n", "\t\t\t}\n", "\t\t\tmustCheckData = false\n", "\t\t\t// Retry\n", "\t\t\tcontinue\n", "\t\t}\n", "\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep...
/* Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
staging/src/k8s.io/cli-runtime/pkg/resource/helper.go
0
https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
[ 0.00019211904145777225, 0.0001697769621387124, 0.00016169219452422112, 0.0001675979292485863, 0.0000062427834564005025 ]