instance_id stringlengths 10 65 | repo stringlengths 5 59 | pr_number int64 1 313k | task_type stringclasses 1
value | base_commit stringlengths 40 40 | review_commit stringlengths 40 40 | title stringlengths 2 282 | body stringlengths 7 3k | patch stringlengths 202 204k | n_defects int64 1 72 | n_supported int64 1 65 | n_major int64 0 32 | defects stringlengths 140 18.8k | certifier_count int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
tianocore__edk2__11129 | tianocore/edk2 | 11,129 | defect | b3a2f7ff24e156e8c4d694fffff01e95a048c536 | 0ebbbeb5cccef14f59384c36fa3e73c348aa6a2e | CLANG 20.1.0 build bug fixes | # Description
Fix issues detected with builds using CLANG 20.1.0.
- [ ] Breaking change?
- [ ] Impacts security?
- [ ] Includes tests?
## How This Was Tested
Perform package builds using CLANGPDB and CLANGDWARF in Windows and Linux using CLANG 20.1.0.
## Integration Instructions
N/A
| diff --git a/MdeModulePkg/Bus/Spi/SpiNorFlashJedecSfdp/SpiNorFlash.c b/MdeModulePkg/Bus/Spi/SpiNorFlashJedecSfdp/SpiNorFlash.c
index 58f7704a2d77f..19f70a4d66e19 100644
--- a/MdeModulePkg/Bus/Spi/SpiNorFlashJedecSfdp/SpiNorFlash.c
+++ b/MdeModulePkg/Bus/Spi/SpiNorFlashJedecSfdp/SpiNorFlash.c
@@ -63,6 +63,7 @@ FillWrite... | 3 | 2 | 0 | [{"id": "G0", "claim": "FillWriteBuffer may need a corresponding check for AddressSize == 0 further down, since that path shifts by zero and performs a zero-length CopyMem, and the function's handling of that case may warrant a rewrite.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "in... | null |
tianocore__edk2__11774 | tianocore/edk2 | 11,774 | defect | 46548b1adac82211d8d11da12dd914f41e7aa775 | 5a0eb9db9e1bed314beed28de84e5fc12b10f3cf | ShellPkg/AcpiView: Adds FPDT Parser | Add a new parser for the Firmware Performance Data Table (FPDT), as per the ACPI6.5 specification.
- [ ] Breaking change?
- **Breaking change** - Does this PR cause a break in build or boot behavior?
- Examples: Does it add a new library class or move a module to a different repo.
- [ ] Impacts security?
-... | diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h
index caa66757612d2..f4cbfbcbddcdf 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h
@@ -3,7 +3,7 @@
... | 8 | 6 | 1 | [{"id": "G0", "claim": "File-static variables in the parser should carry the leading `m` prefix (e.g. `AcpiHdrInfo` should be `mAcpiHdrInfo`), and the other statics that still lack it should be fixed too.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "cl... | null |
tianocore__edk2__5957 | tianocore/edk2 | 5,957 | defect | b1bce5e5649840159d54eb8bffa4fa3d4fae8ee6 | c1a11f7079719a577e251f677d70214713f15269 | Add IA32, X64, ARM, and AARCH64 Stack Cookie Support for MSVC and GCC | # Description
This PR adds broader stack cookie support to the firmware across toolchains
and architectures.
This also pulls in a Unit Test Infrastructure commit that splits some common dependencies out from the Target and Host dsc.inc files so that Host does not depend on Target any longer. This is required for... | diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h
index 7caebbeb1f4af..9eaaeb7d7565a 100644
--- a/MdePkg/Include/Base.h
+++ b/MdePkg/Include/Base.h
@@ -206,6 +206,27 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#define PACKED
+// Omit Function from Stack Overflow Protection.
+#ifndef NO_STACK_COOKI... | 15 | 12 | 3 | [{"id": "G0", "claim": "The default NULL StackCheckLib instance should be added to MdeLibs.dsc.inc, which every platform DSC already includes, so that single-package DSCs do not have to be updated.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The MSVC ... | null |
tianocore__edk2__6032 | tianocore/edk2 | 6,032 | defect | bbee1cc852fa8676ed0b530b1c67c92f32f4f740 | a84cc441f0f3b0492fba4794eb787a2d5b83f8f9 | MdeModulePkg DxeMain: Add late initialization for Debug Agent. | # Description
Add a late initialize in DxeMain for the debug agent. This is required for the debug agent to be able to setup events to handle image loads, exit boot services, and other important callbacks.
Define a reinitialize debug agent.
These are being used in https://github.com/microsoft/mu_feature_debugger... | diff --git a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
index 17d510a287e59..d111ff9babd01 100644
--- a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
+++ b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
@@ -455,6 +455,11 @@ DxeMain (
Status = CoreInitializeEventServices ();
ASSERT_EFI_E... | 1 | 1 | 1 | [{"id": "G0", "claim": "The DebugAgent library instance must also be updated to support the two new DEBUG_AGENT_INIT types added by the pull request, which it does not handle.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
tianocore__edk2__6190 | tianocore/edk2 | 6,190 | defect | 58b4bf7b7e526cec295bfbc6caa4a5cf223a1c53 | 07ace1d941ad4fcaea8b1f22a5e3e1ce9d14bce6 | Cryptopkg provide SM3-only OpensslLib for MbedTlsLib | Provide an OpensslLib variant that carries only the SM3 code, which is all MbedTlsLib needs from it. This removes the need for providing OpenSSL on 32-bit ARM, which results in the need for a softfloat library.
Other explored solutions (#6165, #6189)
- Add new SM3 implementation into BaseCryptLibMbedTls (rejected... | diff --git a/CryptoPkg/Library/BaseCryptLibMbedTls/BaseCryptLib.inf b/CryptoPkg/Library/BaseCryptLibMbedTls/BaseCryptLib.inf
index b76b4e6067712..841c32abea866 100644
--- a/CryptoPkg/Library/BaseCryptLibMbedTls/BaseCryptLib.inf
+++ b/CryptoPkg/Library/BaseCryptLibMbedTls/BaseCryptLib.inf
@@ -19,6 +19,8 @@
VERSION_ST... | 3 | 3 | 2 | [{"id": "G0", "claim": "The pull request's INF files reference the OpenSSL sources via relative paths (DEFINE OPENSSL_PATH = ../OpensslLib/openssl), which Mike had said he did not want in the INF.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The SM3 so... | null |
tickernelz__opencode-mem__2 | tickernelz/opencode-mem | 2 | defect | b43a88df39f91437483073b9f611a2735830c082 | 4d160a70521b24fa5970dc4454934a17ddae6fcd | fix: Windows path handling - replace hardcoded forward slashes with Node.js path module | ## Summary
This PR fixes Windows compatibility issues caused by hardcoded forward slash (`/`) path separators. The changes ensure proper path handling across both Windows and Unix-like systems.
## Changes Made
### Core Fixes
1. **src/services/embedding.ts**
- Changed from: `CONFIG.storagePath + "/.cache"`
- C... | diff --git a/src/services/embedding.ts b/src/services/embedding.ts
index ee3ce980..2b2905a9 100644
--- a/src/services/embedding.ts
+++ b/src/services/embedding.ts
@@ -1,10 +1,11 @@
import { pipeline, env } from "@xenova/transformers";
import { CONFIG } from "../config.js";
import { log } from "./logger.js";
+import ... | 3 | 3 | 0 | [{"id": "G0", "claim": "The `fs` module is imported but never used in the test file; remove the unused import.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The `let displayInfo = ...` line in renderMemoryCard should be indented with 2 spaces t... | null |
tickernelz__opencode-mem__84 | tickernelz/opencode-mem | 84 | defect | dbe32ded3ee3f0306225659420ee742c42cd09ca | c3e5ce50ca84ea6758052e22032d628f2f11f99f | feat(memory): add optional all-projects query scope | ## Summary
- add an optional `scope` parameter for `memory list/search` so callers can choose between the current project shard and all project shards
- add `memory.defaultScope` config support while keeping the default behavior on `project`
- document the new query scope behavior and cover it with config/scope regr... | diff --git a/README.md b/README.md
index 4fef77da..e1d5d9d7 100644
--- a/README.md
+++ b/README.md
@@ -53,6 +53,7 @@ The plugin downloads automatically on next startup.
```typescript
memory({ mode: "add", content: "Project uses microservices architecture" });
memory({ mode: "search", query: "architecture decisions" ... | 4 | 4 | 3 | [{"id": "G0", "claim": "The memory-scope tests named after config-driven behavior pass the scope explicitly and never exercise the fallback to CONFIG.memory.defaultScope or the tool-arg precedence via the tool execute path in src/index.ts; either rename the tests or add a test covering that path.", "category": "testing... | null |
tickernelz__opencode-mem__91 | tickernelz/opencode-mem | 91 | defect | dbe32ded3ee3f0306225659420ee742c42cd09ca | 5d93d7bc28d5d91432a59d13e465e0545a7e15c1 | fix: allow explicit profile preference writes | ## Summary
- allow `memory` tool `mode: "profile"` to persist explicit user preferences when `content` is provided while preserving the existing read behavior
- validate profile write inputs by rejecting `query`, blocking blank/private content, and avoiding writes when no user email can be resolved
- document the write... | diff --git a/src/index.ts b/src/index.ts
index aefd558f..ad19f5b6 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -298,7 +298,12 @@ export const OpenCodeMemPlugin: Plugin = async (ctx: PluginInput) => {
description: `Search memories via keywords (MATCH USER LANGUAGE: ${langName})`,
... | 4 | 4 | 2 | [{"id": "G0", "claim": "afterEach should call connectionManager.closeAll() before rmSync() so the UserProfileManager's cached SQLite connection is closed and the temp directory can be removed (avoiding flaky deletion of open files, notably on Windows).", "category": "testing", "verdict": "supported", "priority": "P2", ... | null |
tickernelz__opencode-mem__92 | tickernelz/opencode-mem | 92 | defect | dbe32ded3ee3f0306225659420ee742c42cd09ca | 54c66f77d36e44046b629d29c32ca9b5cd21c564 | fix(plugin): derive id from package name | ## Summary
Export plugin `id` in `src/plugin.ts` to satisfy the V1 `PluginModule` shape required by OpenCode's file/path plugin loading path.
**Note:** The type-safety refactor commits that were originally part of this PR have been cherry-picked and merged separately via #93.
### Problem
When loading `opencode-mem` ... | diff --git a/src/config.ts b/src/config.ts
index b2d806a7..c97e66f1 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -268,6 +268,8 @@ const CONFIG_TEMPLATE = `{
"autoCaptureEnabled": true,
// Provider type: "openai-chat" | "openai-responses" | "anthropic"
+ // Note: "openai-chat" is a generic OpenAI API-com... | 4 | 3 | 3 | [{"id": "G0", "claim": "isToolCallResponse() only checks that choices is a non-empty array, so it can return true for shapes like { choices: [{}] } and downstream code assuming choice.message exists may throw at runtime; the reviewer suggests strengthening the guard to validate at least choices[0].message (and tool_cal... | null |
tidal-music__tidal-sdk-web__465 | tidal-music/tidal-sdk-web | 465 | defect | 01e035a6b4ea12a160b8737aa44ca9d3d7a5defb | 28f9b6537b571d1234ce8a58e704ec84a0868b84 | feat(player): use new trackManifests API for track playback | - Add _fetchTrackManifest() to fetch track playback info from /trackManifests endpoint
- Add predictPlayerType() to determine player before fetching playback info
- Route videos and Native Player tracks through legacy v1 playbackinfo API
- Update DRM license server URLs (Widevine and FairPlay)
- Add HLS manifest su... | diff --git a/packages/player/cypress/e2e/play-log/case-1.cy.ts b/packages/player/cypress/e2e/play-log/case-1.cy.ts
index f7cd78dd..a9392f46 100644
--- a/packages/player/cypress/e2e/play-log/case-1.cy.ts
+++ b/packages/player/cypress/e2e/play-log/case-1.cy.ts
@@ -19,8 +19,8 @@ it('Client Test Case 1', () => {
// Wait... | 17 | 11 | 5 | [{"id": "G0", "claim": "The error handling in _fetchTrackManifest catches all API errors with a generic 'PENetwork' error and should parse the error response to provide more specific error codes as _fetch does.", "category": "correctness", "verdict": "opposed", "priority": "P1", "scope": "introduced"}, {"id": "G1", "cl... | null |
tidal-music__tidal-sdk-web__470 | tidal-music/tidal-sdk-web | 470 | defect | 1b336c3158b621440878fd558037b3b20b9d42f7 | b914c1939c1d35a86e5396705893b7fe2fb05e9e | feat: fixed player not loading for users not logged in on desktop | **Problem**
When a user pulls down the desktop the webapp passes a config to the sdk to load the native player. Which it does. However, when no logged in the server returns DASH which native player does not support. As a result the player just spins.
**Solution**
Added
- A quick fix to check for DASH and the play... | diff --git a/packages/player/src/internal/handlers/load.ts b/packages/player/src/internal/handlers/load.ts
index 4246aaa3..27879835 100644
--- a/packages/player/src/internal/handlers/load.ts
+++ b/packages/player/src/internal/handlers/load.ts
@@ -159,9 +159,18 @@ export async function load(
const audioQuality =
... | 1 | 1 | 1 | [{"id": "G0", "claim": "The new mimeType logic would still let HLS manifests go to the native player, so Shaka should be forced for both DASH and HLS.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
tidbyt__pixlet__125 | tidbyt/pixlet | 125 | defect | c978cea97165ff0e8c925c9c50c36ea539f01bfa | 140b6d4db9a995175de9aa9515b9637dc5a2d85b | runtime: Fix handling of special config values | Special config values like `$tz` should always be passed through,
regardless of whether they are in the app's schema or not. | diff --git a/runtime/runtime.go b/runtime/runtime.go
index 446de2a4a4..edab74e249 100644
--- a/runtime/runtime.go
+++ b/runtime/runtime.go
@@ -6,6 +6,7 @@ import (
"encoding/json"
"fmt"
"strconv"
+ "strings"
"github.com/pkg/errors"
starlibbase64 "github.com/qri-io/starlib/encoding/base64"
@@ -137,14 +138,15... | 2 | 2 | 0 | [{"id": "G0", "claim": "Dropping config values that are not in the app's schema may silently remove a field apps used to receive; consider allowing them through for now with a log line, and removing that in a follow-up.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "pre_existing"}, {"i... | null |
tidbyt__pixlet__315 | tidbyt/pixlet | 315 | defect | 7afadc0accfc669fdb49695a454146c8b8e14841 | e01b5534f2259c67f4ac116a282d56c67c9f8e97 | modules: Add QRCode module. | # Overview
We want to create apps that include QR codes and wanted to offer a better experience then embedding an image. This change adds a new module, `qrcode` that allows for generating QR codes that look great on the display.
# Notes on QR Codes
- QR Codes have version numbers, which roughly equates to the size... | diff --git a/docs/modules.md b/docs/modules.md
index f3d33b4dfc..d8f50c1458 100644
--- a/docs/modules.md
+++ b/docs/modules.md
@@ -193,4 +193,44 @@ def main(config):
print("You win!")
else:
print("Better luck next time!")
+```
+
+## Pixlet module: QRCode
+
+The `qrcode` module provides a QR code ... | 3 | 3 | 0 | [{"id": "G0", "claim": "The example should cache the generated QR code (the suggested `cache.set(url, code, ttl_seconds=3600*24)` after generation) instead of only reading from the cache and never writing it.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "cl... | null |
tidbyt__pixlet__398 | tidbyt/pixlet | 398 | defect | f0897f892167dfb9687f070a2a2cd11aa25035de | 991ba23d780cd008793b850aaf689aa5776b166c | random: add seed() for deterministic PRNG | This makes the RNG thread-local, and by default reseeded on each applet execution.
User has the option of setting their own seed, which lasts for 1 execution of the applet. | diff --git a/docs/modules.md b/docs/modules.md
index 31875a9ba0..f592f2657e 100644
--- a/docs/modules.md
+++ b/docs/modules.md
@@ -182,10 +182,11 @@ See [examples/sunrise.star](../examples/sunrise.star) for an example.
## Pixlet module: Random
-The `random` module provides a pseudorandom number generator for pixle... | 2 | 2 | 0 | [{"id": "G0", "claim": "Rename random.AttachRandToThread to random.AttachToThread (nit).", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Update the call in runtime/applet.go to random.AttachToThread(t) to match the renamed function (nit).", "cate... | null |
tidbyt__pixlet__518 | tidbyt/pixlet | 518 | defect | 03bee6eb5c0ca6897e865528e2f3fa5b0577daac | 15a343709ac4872dd5dc00e1f7870a52384523d3 | Feature: Plot - ChartType (line, scatter) | Hi tidbyt team!
Was having fun playing around with Pixlet more and saw that [someone requested this feature](https://github.com/tidbyt/pixlet/issues/311) and thought it would be easy to implement!
Let me know if this was something TidByt intentionally didn't want to support or if anything looks wrong!
**Exampl... | diff --git a/render/plot.go b/render/plot.go
index a234eeac15..3fc6c701f2 100644
--- a/render/plot.go
+++ b/render/plot.go
@@ -25,6 +25,7 @@ var FillDampFactor uint8 = 0x55
// DOC(Fill): Paint surface between line and X-axis
// DOC(FillColor): Fill color for Y-values above 0
// DOC(FillColorInverted): Fill color for... | 1 | 1 | 1 | [{"id": "G0", "claim": "An invalid ChartType value (e.g. `foo`) produces no error and silently falls through to the line rendering, and the reviewer asks that going forward an incorrect enum value produce an error.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
tidev__alloy__765 | tidev/alloy | 765 | defect | 784c0a7ea45510953533b1748dae0407316434b8 | 1b6e381127ebe9d4005b8cd14e7d46801aac682f | Add support to set object properties via XML | PR for https://jira.appcelerator.org/browse/ALOY-1363
| diff --git a/Alloy/commands/compile/parsers/default.js b/Alloy/commands/compile/parsers/default.js
index 731c5377a..eaad186c4 100755
--- a/Alloy/commands/compile/parsers/default.js
+++ b/Alloy/commands/compile/parsers/default.js
@@ -53,6 +53,14 @@ function parse(node, state, args) {
args.symbol = CU.generateUniqueId... | 2 | 2 | 2 | [{"id": "G0", "claim": "The pull request should include a test app to exercise the new XML property-setting feature.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The dotted-property handling should be done in the initial pass in getParserArgs, splitti... | null |
tidev__alloy__853 | tidev/alloy | 853 | defect | e37ac2b38199d2fab96113349fa60ee2ac6a8fce | 35a0b4ba3c2aca1c7e01b429e3ee1cd8452fe035 | [ALOY-1584] Android: Ti.UI.Toolbar has no click event | **JIRA:** https://jira.appcelerator.org/browse/ALOY-1584
**Description:**
'onHomeIconItemsSelected ' was not properly inherited from ActionBar when used from Toolbar.
Properties of ActionBar shared between both components are now extracted as constants to avoid future mismatching.
**Test case:**
In JIRA ticket... | diff --git a/Alloy/commands/compile/parsers/Ti.Android.ActionBar.js b/Alloy/commands/compile/parsers/Ti.Android.ActionBar.js
index 29de1c9e4..f8840837c 100644
--- a/Alloy/commands/compile/parsers/Ti.Android.ActionBar.js
+++ b/Alloy/commands/compile/parsers/Ti.Android.ActionBar.js
@@ -12,7 +12,7 @@ function parse(node, ... | 2 | 2 | 2 | [{"id": "G0", "claim": "Ti.UI.Toolbar.js uses CONST.* constants without defining or importing CONST, so the file must define CONST.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "The pull request adds no test app for the new Toolbar behaviour, and f... | null |
tidwall__geojson__2 | tidwall/geojson | 2 | defect | 928ede3da18d831dea0af0bb26adeb025145c23b | da20a5ac220c10abe607068760840df05d57570b | Add methods for Circle to do exact Contains/Intersects tests for sim… | …ple objects:
points, lines, and circles. Defer the rest to approximating polygon. | diff --git a/circle.go b/circle.go
index 12de3dc..d38e310 100644
--- a/circle.go
+++ b/circle.go
@@ -78,3 +78,112 @@ func (g *Circle) Meters() float64 {
func (g *Circle) Center() geometry.Point {
return g.center
}
+
+func (g *Circle) Contains(obj Object) bool {
+ if p, ok := obj.(*Point); ok {
+ return p.Distance(... | 5 | 5 | 2 | [{"id": "G0", "claim": "The if-chains of consecutive type assertions in Contains and Intersects should be rewritten as switch-style type assertions.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Contains should handle Collection (and thus Multi... | null |
tidwall__tile38__128 | tidwall/tile38 | 128 | defect | 4300feccd6b993b407fc34fa8e4c199412b8284e | aac5cfca19e81025e2d4b56c025f72dd7118f642 | Disable HTTP & WebSocket transports on demand. | Simple **HTTP** & **WebSocket** transport disabling by using:
```bash
./tile38-server --http-transport false
```
Resolving: #92
@tidwall need your review. | diff --git a/.gitignore b/.gitignore
index 3d40845a2..c7c2978cb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,8 +2,9 @@
tile38-*
!cmd/tile38-*
data*/
-coverage.out
+coverage.out
packages/
-# Ignore VS Code folder
-.vscode/
\ No newline at end of file
+# Ignore IDE folders
+.idea/
+.vscode/
diff --git a/cmd/tile... | 1 | 1 | 1 | [{"id": "G0", "claim": "The --http-transport flag should also accept \"yes\" and \"no\" as option values.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
tidwall__tile38__663 | tidwall/tile38 | 663 | defect | 9c471e3f9c9bfe907379ee2ad502b2f75fd0c5eb | fa74ffa10f860906f9d734509d80dcfdbba7c277 | Prevent certain Lua modules/functions from loading | This PR resolves #630.
## Changes:
- Modified `lua.NewState()` call to open **only** the following modules:
* base\*
* table
* math
* string
* os\*
> \* Only opens `base.tonumber()`, `base.tostring()`, `os.clock()`, and `os.difftime()`.
- Vendored internal Lua function implementations... | diff --git a/internal/server/scripts.go b/internal/server/scripts.go
index 3aae4114..5f781f80 100644
--- a/internal/server/scripts.go
+++ b/internal/server/scripts.go
@@ -26,6 +26,9 @@ const (
maxLuaPoolSize = 1000
)
+// For Lua os.clock() impl
+var startedAt time.Time
+
var errShaNotFound = errors.New("sha not f... | 4 | 3 | 0 | [{"id": "G0", "claim": "The startedAt declaration can be simplified to `var startedAt = time.Now()`, with the `init()` function removed altogether.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "`strings.Contains(str, \".\")` would be better tha... | null |
tidyverse__haven__629 | tidyverse/haven | 629 | defect | 0b95234516bfa4a210601b061c96ded0f58d120c | 65f898276ad7eec9118892f463e7ba8f70542369 | Add support for writing SPSS user missing values to integer vectors | This PR fixes #596, adding write support for SPSS user missing values for integers as well as doubles.
This includes a minor change to the readstat SAV writing code - this change has been made upstream and will come through in the next readstat release (see WizardMac/ReadStat#251).
One thing to note is that we ne... | diff --git a/NEWS.md b/NEWS.md
index b362c78c..3b9c988b 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,5 +1,8 @@
# haven (development version)
+* `write_sav()` successfully writes user missing values and ranges for
+ `labelled()` integer vectors (@gorcha, #596).
+
# haven 2.4.3
* Fix build failure on Solaris.
diff --... | 2 | 2 | 1 | [{"id": "G0", "claim": "A test should be added covering the new INTSXP na_range handling case in src/DfWriter.cpp.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The comment explaining that na_range must be handled for both REAL and INTEGER because it c... | null |
tier4__awkernel__254 | tier4/awkernel | 254 | defect | 29c3d31173bf4c5792b297ae545026aaba6b89b2 | fecabaf7d1ea7b6275203de51a3a6c399b4ce540 | Fix #230: Modify Barrier::wait to return BarrierWaitResult | To make the current implementation of `Barrier` API compatible with other libraries like tokio, following changes were made.
1. Modified `Barrier::wait` to return `BarrierWaitResult`
2. Removed unnecessary `Arc` since it is common to use `Barrier` struct wrapped with `Arc`
See
https://doc.rust-lang.org/beta/std... | diff --git a/applications/tests/test_measure_channel/src/lib.rs b/applications/tests/test_measure_channel/src/lib.rs
index 5561d8a20..3efbdd5ae 100644
--- a/applications/tests/test_measure_channel/src/lib.rs
+++ b/applications/tests/test_measure_channel/src/lib.rs
@@ -4,12 +4,9 @@ extern crate alloc;
use alloc::{for... | 3 | 3 | 1 | [{"id": "G0", "claim": "The new Barrier should get unit tests modelled on the existing sync/mutex.rs tests.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Barrier::wait should be made to cope with being called more than `count` times.", "category": "cor... | null |
tier4__awkernel__433 | tier4/awkernel | 433 | defect | 2d83a54a415d5755f19485543018ae44f0f32e8a | 755db37eecfdb8a544409e5e66adb72614f4ec99 | feat: build dag | ## Description
Implementation of a function to build a DAG structure from `DagData` parsed from yaml.
This PR does not spawn the DAG itself. See [#427](https://github.com/tier4/awkernel/pull/427/files#diff-b61c28b3d7f2e76d2a4d493336bbba376bed20717036c4592d29b59063d303ea) for actual usage.
## Related links
- [Tick... | diff --git a/applications/rd_gen_to_dags/src/build_dag.rs b/applications/rd_gen_to_dags/src/build_dag.rs
new file mode 100644
index 000000000..39b9deff2
--- /dev/null
+++ b/applications/rd_gen_to_dags/src/build_dag.rs
@@ -0,0 +1,260 @@
+use crate::parse_yaml::{DagData, NodeData};
+use crate::time_unit::{convert_duratio... | 5 | 5 | 1 | [{"id": "G0", "claim": "The comments on the enum at the top of build_dag.rs should be documentation comments (///) rather than regular comments.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The reviewer asks why setup_node_registration and the r... | null |
tier4__awkernel__436 | tier4/awkernel | 436 | defect | e2bb1dc6b216931e14cc1d6ba55df58543e28db2 | 414b9efdb8cd57f6d250c10b36a54126d107641d | feat(preempt): voluntary preemption | ## Description
Because IPIs are edge trigger, a preemption request may be ignored if a task disable and enable interrupts.
This PR implements a voluntary preemption mechanis to handle such case.
`PREEMPTION_REQUEST` is a static variable to store requests of preemption, and it is checked when enabling interrupts... | diff --git a/applications/tests/test_voluntary_preemption/Cargo.toml b/applications/tests/test_voluntary_preemption/Cargo.toml
new file mode 100644
index 000000000..f3ddd0c67
--- /dev/null
+++ b/applications/tests/test_voluntary_preemption/Cargo.toml
@@ -0,0 +1,15 @@
+[package]
+name = "test_voluntary_preemption"
+vers... | 1 | 1 | 1 | [{"id": "G0", "claim": "set_need_preemption stores the preemption request in PREEMPTION_REQUEST at the calling CPU's offset (awkernel_lib::cpu::cpu_id()) instead of at the target CPU's offset, so the intended target CPU may not recognize the preemption request.", "category": "correctness", "verdict": "supported", "prio... | null |
tier4__awkernel__608 | tier4/awkernel | 608 | defect | c1d9bab9078eccbf65ed90a2cdf7064a1352a3a7 | d0aa495821a9085151aea500214c9ff14b14f198 | feat(time): implementation of interval method | ## Description
Based on [interval.rs](https://github.com/tokio-rs/tokio/blob/master/tokio/src/time/interval.rs), I implemented a utility for periodic execution.
This is used to run a DAG at a regular interval.
## Related links
[Ticket](https://tier4.atlassian.net/browse/RT2-2544)
## How was this PR tested?
... | diff --git a/applications/tests/test_dag/src/lib.rs b/applications/tests/test_dag/src/lib.rs
index 2222866e2..15291db2e 100644
--- a/applications/tests/test_dag/src/lib.rs
+++ b/applications/tests/test_dag/src/lib.rs
@@ -12,11 +12,17 @@ const LOG_ENABLE: bool = false;
pub async fn run() {
wait_microsec(1000000);
... | 5 | 3 | 1 | [{"id": "G0", "claim": "Casting the u128 difference to u64 in saturating_duration_since could overflow u64::MAX and lose data; use saturating_sub with min(u64::MAX as u128) or a Result to handle overflow.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim"... | null |
tier4__awkernel__653 | tier4/awkernel | 653 | defect | 93dbb0a4d820cfb499d5cca272e059fb21d2543d | 1839e8f19380c67a87f41d4ab3115e58022a6f09 | feat(dag): implement GEDF | ## Description
・Implemented the GEDF scheduler for DAGs
・Modified existing implementations: awkernel_async_lib/src/dag.rs and awkernel_async_lib/src/task.rs
・Partially revised specifications around spawn operations
・No visual changes to user-written code
## Related links
[Google Slide](https://docs.google.com/p... | diff --git a/awkernel_async_lib/src/dag.rs b/awkernel_async_lib/src/dag.rs
index 2cf389d02..76be527d6 100644
--- a/awkernel_async_lib/src/dag.rs
+++ b/awkernel_async_lib/src/dag.rs
@@ -168,6 +168,7 @@ impl core::fmt::Display for DagError {
pub struct Dag {
id: u32,
graph: Mutex<graph::Graph<NodeInfo, EdgeInf... | 15 | 11 | 1 | [{"id": "G0", "claim": "Insert a blank line between the `to_node_index` function and the `EdgeInfo` struct in dag.rs.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Do not add public test-only helper functions (`add_node_with_topic_edges_public`... | null |
tighten__ziggy__57 | tighten/ziggy | 57 | defect | e8fc2ab8dd66f1531c3591f36c9e40f6840f7e92 | fa3a91e376ef9032811ae60fabf3a508e2445334 | some fixes | removed redundant escape
added missing var and semicolon
added test for unknown route and if route() is used with no route name
added check for unknown route and if you use route() with no route name provided it will also throw an error
@DanielCoulbourne | diff --git a/src/js/route.js b/src/js/route.js
index b85e1b5f..8ae868a3 100644
--- a/src/js/route.js
+++ b/src/js/route.js
@@ -4,9 +4,6 @@ var Router = function(name, params, absolute) {
this.absolute = absolute === undefined ? true : absolute;
this.domain = this.constructDomain();
this.url = namedRoutes... | 1 | 1 | 1 | [{"id": "G0", "claim": "The check for the absolute param (`if (this.absolute)`) was removed from constructDomain so the domain is now always returned even when a relative URL was requested, and it should be restored and covered by a test.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "... | null |
tighten__ziggy__831 | tighten/ziggy | 831 | defect | 471c5d6efb10b8b93e854044990fde7d688bba9c | 29ecac3ee56dfde3e788e939d2caa59bf8d6619e | Add JSON option to `@routes` for improved CSP compatibility | This pull request introduces a new `asJson` boolean option to the `@routes` Blade directive, improving compatibility with strict Content Security Policies (CSP).
When `asJson` is set to `true`, the directive outputs the Ziggy configuration as a JSON object inside a `<script>` tag with `type="application/json"`. This... | diff --git a/README.md b/README.md
index 16e8b3ce..b8ff2aa9 100644
--- a/README.md
+++ b/README.md
@@ -526,7 +526,13 @@ If your application is using [TLS/SSL termination](https://en.wikipedia.org/wiki
### Using `@routes` with a Content Security Policy
-A [Content Security Policy](https://developer.mozilla.org/en-U... | 2 | 2 | 1 | [{"id": "G0", "claim": "Since the JSON script tag is inert, the nonce attribute should be omitted when the asJson option is used instead of appending it.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The ZiggyVue plugin should create the global window.r... | null |
tikv__agatedb__11 | tikv/agatedb | 11 | defect | fc497f1c00423180f9a448b92a581cf43fcd3458 | ea05bc56ff2e72ec324de71853c1606457c10202 | fix test and bench panic | Signed-off-by: Alex Chi <iskyzh@gmail.com>
**Benchmark failure**
This is done by simply changing the capacity of skiplist while running this unit test. The long term solution will be changing iteration number of Criterion.rs in each bench case.
**`test_one_key` failure**
From GitHub Action log I found that ... | diff --git a/skiplist/benches/bench.rs b/skiplist/benches/bench.rs
index 84805039..68cde5c1 100644
--- a/skiplist/benches/bench.rs
+++ b/skiplist/benches/bench.rs
@@ -128,7 +128,7 @@ fn bench_read_write_map(c: &mut Criterion) {
fn bench_write_skiplist(c: &mut Criterion) {
let comp = FixedLengthSuffixComparitor:... | 1 | 1 | 1 | [{"id": "G0", "claim": "Merging the write and read pools into one task queue makes gets run nearly one by one after puts, defeating the test's purpose of executing get alongside put.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
tikv__agatedb__116 | tikv/agatedb | 116 | defect | 7f6603b1f1641ddbb6eb1265bbcd608368bf105c | b7298e2730ed3d1c1733ab13ecd0b743d92401ef | thread-local arena: grow buf if there is no enough space | Signed-off-by: zhangjinpeng1987 <zhangjinpeng@pingcap.com>
**Changes**
- Arena: add UT for arena
- Arena: grow buffer if there is no enough space, so Arena::alloc alway will success
- Arena: Allocate 8-byte aligned memory
- Arena: support larger arena whose size is large than 4GB | diff --git a/skiplist/src/arena.rs b/skiplist/src/arena.rs
index 10c7e6cf..e45a60dc 100644
--- a/skiplist/src/arena.rs
+++ b/skiplist/src/arena.rs
@@ -30,7 +30,8 @@ impl Arena {
mem::forget(buf);
Arena {
core: Arc::new(ArenaCore {
- len: AtomicU32::new(1),
+ ... | 6 | 4 | 2 | [{"id": "G0", "claim": "A debug assertion that `align` is a power of two should be added to `Arena::alloc`.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "The offset returned by `alloc` is supposed to be aligned, but the change returns the raw bum... | null |
tikv__agatedb__163 | tikv/agatedb | 163 | defect | e01e291d2a9e181ab128e16e653a714ab0ea462a | 7b932ea293c7fec1a56c6c15ce8680d2dbc16509 | skiplist: doubly list [20x faster reverse scan] | Signed-off-by: zhangjinpeng1987 <zhangjinpeng@pingcap.com>
close https://github.com/tikv/agatedb/issues/134
Implement doubly link of skiplist for the single-thread write scenario. It makes the reverse scan 20x faster than before.
```
skiplist_reverse_scan time: [1.5644 ms]
doubly_skiplist_reverse_scan tim... | diff --git a/skiplist/benches/bench.rs b/skiplist/benches/bench.rs
index f2ef7bec..311ff984 100644
--- a/skiplist/benches/bench.rs
+++ b/skiplist/benches/bench.rs
@@ -163,10 +163,50 @@ fn bench_write_skiplist(c: &mut Criterion) {
j.join().unwrap();
}
+fn bench_reverse_scan_skiplist(c: &mut Criterion) {
+ let... | 2 | 1 | 0 | [{"id": "G0", "claim": "Apply the doubly-linked fast reverse scan when concurrent writes are allowed too, not only when they are disallowed.", "category": "performance", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new \"fast\" reverse-scan benchmark's name does not convey ... | null |
tikv__agatedb__19 | tikv/agatedb | 19 | defect | 38e99a848b234bddf09359f94a062c5668235c79 | e4cc3c209f3b08f21bfe8e2802e64ea3e7e92710 | table: prepare for adding table impl | Signed-off-by: Alex Chi <iskyzh@gmail.com>
* fix typo of `Comparator`
* fix endian for all SST
* prepare for adding table implementation | diff --git a/proto/src/proto/meta.proto b/proto/src/proto/meta.proto
index 253c3237..010c0420 100644
--- a/proto/src/proto/meta.proto
+++ b/proto/src/proto/meta.proto
@@ -56,6 +56,8 @@ message TableIndex {
repeated BlockOffset offsets = 1;
bytes bloom_filter = 2;
uint32 estimated_size = 3;
+ uint64 max_versio... | 5 | 3 | 0 | [{"id": "G0", "claim": "The custom search helper could be replaced by the standard `slice.binary_search_by` instead of a hand-written rewrite of golang sort.Search.", "category": "design", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The comparator type name `KeyComparitor` i... | null |
tikv__client-rust__108 | tikv/client-rust | 108 | defect | cef98f2cb6a55db903d55ebe52466c124b1d3caa | f093c64f21e0d471722ce423200b7cc36d4682bd | Resolve locks | When locks are returned, we need to resolve the locks and try again. Locks are resolved in the unit of tuple (transaction, region). We use `CleanupRequest` to clean the primary lock (if the lock is not committed) or get the commit version. Then, use the commit version to resolve the locks.
In this PR, variants of re... | diff --git a/Cargo.toml b/Cargo.toml
index cfb67b3c..4622c0fb 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -22,7 +22,7 @@ derive-new = "0.5"
failure = "0.1"
futures-preview = { version = "0.3.0-alpha.18", features = ["compat", "async-await", "nightly"] }
grpcio = { version = "0.5.0-alpha", features = [ "secure", "pro... | 11 | 9 | 2 | [{"id": "G0", "claim": "A default implementation of `take_locks` on `HasLocks` (with a one-line impl per response type) should be used instead of the `dummy_impl_has_locks!` macro.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The resolve-lock ... | null |
tikv__client-rust__109 | tikv/client-rust | 109 | defect | 8f6be705e17b5eb90a826ee64273c7775ba4b1bb | fc05d8b938b84789cff3480640b34917bd1f183a | Implement 2PC | - [x] Merge #112 first
This PR implements two-phase commit. It is a very initial implementation but should work well.
After this PR, the transaction part is barely enough to be functional.
For the added part of this PR, there are some todos (will update to issues when the pr gets merged):
- When committing th... | diff --git a/examples/transaction.rs b/examples/transaction.rs
index 83793689..0b4d982a 100644
--- a/examples/transaction.rs
+++ b/examples/transaction.rs
@@ -62,7 +62,7 @@ async fn main() {
Config::new(args.pd)
};
- let txn = Client::connect(config)
+ let txn = Client::new(config)
.await... | 7 | 3 | 2 | [{"id": "G0", "claim": "The impl AsRef<Key> for kvrpcpb::Mutation should be replaced with a more explicit conversion trait (with a comment left on it for now), since the reviewer generally dislikes implicit AsRef/Deref-style conversions.", "category": "design", "verdict": "opposed", "priority": "P2", "scope": "introduc... | null |
tikv__client-rust__141 | tikv/client-rust | 141 | defect | 65602f7a45c9807a4119fc28488519a4ac9b8e4c | 8ee5f496482e007e43e9086642649aecf227919c | Async reconnect | UCP https://github.com/tikv/client-rust/issues/132
| diff --git a/Cargo.toml b/Cargo.toml
index 867d7909..03272113 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -30,6 +30,7 @@ regex = "1"
serde = "1.0"
serde_derive = "1.0"
futures-timer = "3.0"
+async-trait = "0.1.27"
[dependencies.prometheus]
version = "0.8"
diff --git a/examples/raw.rs b/examples/raw.rs
index 2c68... | 3 | 3 | 1 | [{"id": "G0", "claim": "The type parameter `Fu` on `PdRpcClient::new` could be replaced with something more meaningful, for example `PdFut`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Concurrent `reconnect` calls could make a mess; better to... | null |
tikv__client-rust__152 | tikv/client-rust | 152 | defect | fe765f191115d5ca0eb05275e45e086c2276c2ed | bb47a2ad6a566dfb279f273a2be1d8d88a15791d | set Value type to an alias of Vec<u8> | set Value type to an alias of Vec<u8> since the Original Value implementation does not do more than Vec<u8>. (#151 )
Signed-off-by: ekexium <ekexium@gmail.com> | diff --git a/examples/raw.rs b/examples/raw.rs
index 133759923..2fb349295 100644
--- a/examples/raw.rs
+++ b/examples/raw.rs
@@ -43,7 +43,7 @@ async fn main() -> Result<()> {
// Above, you saw we can use a `&'static str`, this is primarily for making examples short.
// This type is practical to use for real t... | 1 | 1 | 0 | [{"id": "G0", "claim": "The proptest code the pull request added in src/proptests/raw.rs appears not to be fully rustfmt-formatted (the arm `None =>assert!` is missing a space after `=>`).", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
tikv__client-rust__173 | tikv/client-rust | 173 | defect | 6fca06a7cb1a603daa7fbddd9b3ccde5619c1284 | da7d0d9d1f35b7f90fcf3e7940ceb98ec622d2f7 | Fix txn.batch_get | Previously `txn.batch_get` returns an iterator of `(Key, Option<Value>)`. However, it does not always return all non-existent entries, which is confusing.
Changes:
Change the signature and behavior to be same as `raw.batch_get`: it returns an iterator of `Kvpair` and skips non-existent entries. | diff --git a/src/raw/client.rs b/src/raw/client.rs
index a9917b22..7957debc 100644
--- a/src/raw/client.rs
+++ b/src/raw/client.rs
@@ -103,7 +103,7 @@ impl Client {
/// Create a new 'batch get' request.
///
/// Once resolved this request will result in the fetching of the values associated with the
- ... | 3 | 3 | 0 | [{"id": "G0", "claim": "Fix the misspelled word \"entris\" in the batch_get doc comment to \"entries\".", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The None arm of the match could be replaced by calling v.map(...) instead of matching on the unw... | null |
tikv__client-rust__182 | tikv/client-rust | 182 | defect | caa869e041cf3d408af14030526810d84e449eb1 | 092042fc605f85088c15b83410d884494631f604 | GC: initial implementation | An attempt to implement GC.
- The implementation does not contain the second step "delete ranges" described in the [doc](https://docs.pingcap.com/tidb/stable/garbage-collection-overview). | diff --git a/src/mock.rs b/src/mock.rs
index 257c8e8b..d77b6393 100644
--- a/src/mock.rs
+++ b/src/mock.rs
@@ -146,6 +146,10 @@ impl PdClient for MockPdClient {
fn get_timestamp(self: Arc<Self>) -> BoxFuture<'static, Result<Timestamp>> {
unimplemented!()
}
+
+ fn update_safepoint(self: Arc<Self>, ... | 2 | 2 | 0 | [{"id": "G0", "claim": "The new `gc` method should have some necessary documentation added.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The scan-lock loop could use `mem::take(&mut start_key)` instead of cloning `start_key` to reduce a clone.",... | null |
tikv__client-rust__201 | tikv/client-rust | 201 | defect | ca8884f00efb8f879bf2050b1d18583027a27899 | 1857ed2f83e2487c1c9b0f21867468618a18c094 | Improve ergonomics | This PR contains two changes:
1. move `key_only` from client to scan.
2. move `pd_endpoints` from config to client.
IMO, these two are a bit confusing and not so idiomatic to rust. | diff --git a/examples/pessimistic.rs b/examples/pessimistic.rs
index dcd6ee5c..d543c85a 100644
--- a/examples/pessimistic.rs
+++ b/examples/pessimistic.rs
@@ -14,13 +14,13 @@ async fn main() {
// Create a configuration to use for the example.
// Optionally encrypt the traffic.
let config = if let (Some(c... | 1 | 1 | 0 | [{"id": "G0", "claim": "Moving key_only from an optional client setting to a required scan parameter adds boilerplate against the design philosophy for rarely-used options; a scan/scan_keys method split is proposed instead.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
tikv__client-rust__213 | tikv/client-rust | 213 | defect | 0c7fd9594cf1ed3caca7792318002474a5afe5f3 | d60b1a1babc813246c86a8c491f3f0c2d1550cf3 | Refactor the transaction API re how we set options, and add some options to skip resolve and retry | The goal here is to make it easier for users to have more control over transactions if they want it, without adding boilerplate to the common path. It also polishes our API a little in a general way, e.g., not prioriitising optimistic transactions over pessimistic ones (since the latter are usually the better default).... | diff --git a/examples/pessimistic.rs b/examples/pessimistic.rs
index 06e84278c..26f5a033e 100644
--- a/examples/pessimistic.rs
+++ b/examples/pessimistic.rs
@@ -28,7 +28,10 @@ async fn main() {
let value1: Value = b"value1".to_vec();
let key2: Key = b"key2".to_vec().into();
let value2: Value = b"value2".... | 6 | 4 | 1 | [{"id": "G0", "claim": "The `RetryOptions` type added by this pull request is not public (not reachable from outside the crate).", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "`try_one_pc` appears in both `TransactionOptions` and `Config`, and the review... | null |
tikv__client-rust__218 | tikv/client-rust | 218 | defect | 3392e6341ba66fa085169f6ca1d2a6626789d155 | f4fa7a90c688aa1db215ecdc72f9b6d696d1caab | Fix several bugs in pessimistic transaction | Closes #188, #216
The PR fixes 4 problems:
- `get_for_update` (read locks) are not recorded in the buffer, thus cannot be committed or rolled back.
- The semantics of `get_for_update` are different from those in TiDB.
- Lock and read operations can override each other in the buffer.
- `for_update_ts` for `Pessi... | diff --git a/src/transaction/buffer.rs b/src/transaction/buffer.rs
index 265b2a90b..16dae9dbc 100644
--- a/src/transaction/buffer.rs
+++ b/src/transaction/buffer.rs
@@ -6,12 +6,12 @@ use std::{
future::Future,
};
use tikv_client_proto::kvrpcpb;
-use tokio::sync::Mutex;
+use tokio::sync::{Mutex, MutexGuard};
/... | 11 | 9 | 0 | [{"id": "G0", "claim": "The get_for_update docs say the value is fetched \"at current timestamp\" without defining what \"current\" means.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The reviewer asks why get_for_update does not distinguish bet... | null |
tikv__client-rust__222 | tikv/client-rust | 222 | defect | 3392e6341ba66fa085169f6ca1d2a6626789d155 | 0de0163b294271edb7373843bf1ecd1d595565a7 | Add an option to control the behavior when txns get dropped | Currently, when a transaction is dropped without an attempt to commit or rollback, it panics. It prevents users using the `some_request.await?` pattern. And sometimes we don't care if it's dropped gracefully, e.g. in tests.
Changes:
- Add an option to `TransactionOptions` to control this. We can choose to warn inst... | diff --git a/src/transaction/transaction.rs b/src/transaction/transaction.rs
index bd448dbd..a10bc3d7 100644
--- a/src/transaction/transaction.rs
+++ b/src/transaction/transaction.rs
@@ -521,7 +521,14 @@ impl Transaction {
impl Drop for Transaction {
fn drop(&mut self) {
if self.status == TransactionStat... | 4 | 3 | 1 | [{"id": "G0", "claim": "The new CheckLevel enum should have a `None` level, so that dropping an active transaction can be checked not at all.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Instead of the boolean argument of drop_check, the enum CheckLeve... | null |
tikv__client-rust__236 | tikv/client-rust | 236 | defect | a7c41819c3cdc2e6bc039a7462113af464b2d18f | f4ed072ec19752ea10fd87a9ac2024a8bb5f4936 | Automatic heartbeat | Closes #227
Closes #189
PS: This PR is submitted as my code task for applying LFX mentorship 2021 Spring. | diff --git a/Cargo.toml b/Cargo.toml
index bbf0b18e..754dbe0f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -31,7 +31,7 @@ regex = "1"
serde = "1.0"
serde_derive = "1.0"
thiserror = "1"
-tokio = { version = "1.0", features = [ "sync" ] }
+tokio = { version = "1.0", features = [ "sync", "time" ] }
tikv-client-common... | 3 | 2 | 1 | [{"id": "G0", "claim": "Use a constant (or configurable) heartbeat interval instead of the hardcoded 5-second integer literal, suggested at 10 seconds.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The pull request has build errors that should ... | null |
tikv__client-rust__250 | tikv/client-rust | 250 | defect | 486a4b2e1434cb36060795014d81b1211ed69ddf | 94fac555bf3664c03bb4d6358a4329c99393835a | Calculate cleverer TTL for transaction | Closes [#249](https://github.com/tikv/client-rust/issues/249) | diff --git a/src/kv/key.rs b/src/kv/key.rs
index b46510b4e..fedaf277f 100644
--- a/src/kv/key.rs
+++ b/src/kv/key.rs
@@ -126,6 +126,10 @@ impl Key {
encoded.encode_bytes(&self.0, false).unwrap();
Key(encoded)
}
+
+ pub fn len(&self) -> usize {
+ self.0.len()
+ }
}
impl From<Vec<u... | 19 | 17 | 4 | [{"id": "G0", "claim": "The new buffer method should be named get_write_size instead of get_size to better reflect what it measures.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new Committer method txn_lock_ttl should be renamed to calc_t... | null |
tikv__client-rust__252 | tikv/client-rust | 252 | defect | 486a4b2e1434cb36060795014d81b1211ed69ddf | d789cc650bc6a1e6a5e00f275d1ef0dab04d4231 | Fix batch_get_for_update | The PR tries to fix the `batch_get_for_update` by introducing a new plan `PreserveKeys` and a merge strategy `MergeAndMatchKey`. | diff --git a/src/kv/key.rs b/src/kv/key.rs
index b46510b4..1bbe11e5 100644
--- a/src/kv/key.rs
+++ b/src/kv/key.rs
@@ -128,6 +128,10 @@ impl Key {
}
}
+pub trait HasKeys {
+ fn get_keys(&self) -> Vec<Key>;
+}
+
impl From<Vec<u8>> for Key {
fn from(v: Vec<u8>) -> Self {
Key(v)
diff --git a/src/... | 5 | 4 | 0 | [{"id": "G0", "claim": "The standalone `use super::plan::PreserveKey;` import lines in plan_builder.rs and shard.rs should be folded into the crate-level `use` group instead of sitting as separate imports.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "c... | null |
tikv__client-rust__253 | tikv/client-rust | 253 | defect | 4870985dcdce8faaab9f701b055e1deb8ffe3d52 | c2987a8809d1459025269a8e078a5c6f3879bf2d | Fix two bugs with insert and delete | Fixes #234
PTAL @sticnarf
Previously there were two bugs:
* If the user deletes a key, then inserts a value to the same key, then there will be false positive failure of the insert invariant. This is fixed by converting the insert into a put.
* If the user inserts then deletes a key, the delete is converted ... | diff --git a/src/transaction/buffer.rs b/src/transaction/buffer.rs
index 1d7f61b90..2ec1d86cf 100644
--- a/src/transaction/buffer.rs
+++ b/src/transaction/buffer.rs
@@ -1,17 +1,21 @@
// Copyright 2019 TiKV Project Authors. Licensed under Apache-2.0.
use crate::{BoundRange, Key, KvPair, Result, Value};
+use derive_n... | 4 | 3 | 0 | [{"id": "G0", "claim": "When the buffer already holds a lock on a key, locking it again is unnecessary unless auto_heartbeat is disabled or a value is needed but not cached.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "CheckNotExist combined wit... | null |
tikv__client-rust__256 | tikv/client-rust | 256 | defect | f2f96f04a45d8a79397d2dcd1357948a784f4cac | a3f53616a9e741dfc3e9fce633e16af5bca22266 | Remove the Mutex in Buffer | I don't see the reason of having a Mutex here... Do I miss anything?
| diff --git a/src/transaction/buffer.rs b/src/transaction/buffer.rs
index 2ec1d86c..3aa18f5a 100644
--- a/src/transaction/buffer.rs
+++ b/src/transaction/buffer.rs
@@ -7,7 +7,6 @@ use std::{
future::Future,
};
use tikv_client_proto::kvrpcpb;
-use tokio::sync::{Mutex, MutexGuard};
#[derive(new)]
struct InnerBu... | 1 | 1 | 0 | [{"id": "G0", "claim": "With the Mutex removed, the inner/outer Buffer/InnerBuffer split is no longer needed and should be dropped.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
tikv__client-rust__258 | tikv/client-rust | 258 | defect | 4870985dcdce8faaab9f701b055e1deb8ffe3d52 | d3e5ffbde1a6bc884fcf2e509a370a0f69810326 | Make get_for_update work for optimistic txns | I think we can make `get_for_update` and `batch_get_for_update` support optimistic transactions, just like `SELECT ... FOR UPDATE` in TiDB.
Then the API looks more consistent: in both optimistic and pessimistic transactions, `lock_keys` just lock the keys, and `(batch_)get_for_update` locks keys and retrieves values... | diff --git a/src/transaction/transaction.rs b/src/transaction/transaction.rs
index 1fe8be4c..0b162cc9 100644
--- a/src/transaction/transaction.rs
+++ b/src/transaction/transaction.rs
@@ -116,6 +116,17 @@ impl<PdC: PdClient> Transaction<PdC> {
}
/// Create a `get for udpate` request.
+ /// It has differen... | 1 | 1 | 0 | [{"id": "G0", "claim": "The new doc comment on `get_for_update` is not very clear and should be updated to state explicitly that the operation reads at the start timestamp and caches the value in the optimistic case, and that the optimistic lock is only written at prewrite/commit and cannot prevent concurrent transacti... | null |
tikv__client-rust__268 | tikv/client-rust | 268 | defect | da26bb4927f904e1f36d65c4c8e661107a500ff9 | 3aad365b4ea2afb726199f0a6bd787e004cc5b41 | Support multi-reigon test | Previously bugs with multiple regions are hard to find in tests (e.g. #251), we should improve our test to cover such situation.
Changes:
- Support integration tests with multiple regions
- Improve the `write_million` tests since they don't have to write much data to make region split. As a result tests should be ... | diff --git a/.travis.yml b/.travis.yml
index 8f82fde25..bf19a3433 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -48,13 +48,15 @@ script:
# For now we only run full integration tests on Linux. Here's why:
# * Docker on OS X is not supported by Travis.
# * Docker on Windows seems to not have the correct binary a... | 3 | 3 | 2 | [{"id": "G0", "claim": "Rename the helper from ensure_region_splitted to ensure_region_split and fix the comment to read \"wait until regions split\" for grammar.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The wait loop in ensure_region_spli... | null |
tikv__client-rust__298 | tikv/client-rust | 298 | defect | 24fa2680d22e3600e81b2fa29abda5410a23b391 | 9cea81a37a0bd4e8dc61935c26e358a2a55fea89 | migrate to slog | See https://github.com/tikv/client-rust/pull/294#issuecomment-849344011 | diff --git a/Cargo.toml b/Cargo.toml
index 06e02809..84790ace 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -31,6 +31,8 @@ rand = "0.8"
regex = "1"
serde = "1.0"
serde_derive = "1.0"
+slog = { version = "2.3", features = ["max_level_trace", "release_max_level_debug"] }
+slog-term = { version = "2.4" }
thiserror = "1"... | 4 | 4 | 2 | [{"id": "G0", "claim": "The library should let the user pass the logger when creating a Client, accepting an Option<Logger> and creating a default one when it is None.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The optional-logger match block in RawC... | null |
tikv__client-rust__332 | tikv/client-rust | 332 | defect | 196b06eb9da24de6cd5803dd2cb779685d72d969 | ee61fcbe293132e1fcf3ea445ea1dac69df56474 | txn: Error handling for pessimistic locks | Close: #313
# What's changed
Automatic rollback successful locks when `pessimistic_lock` is failed.
# How it is done
Add a new error `PessimisticLockError` holding successful locks return by TiKV server.
On failure, `pessimistic_lock` acquires the successful keys from `PessimisticLockError` and do the rollback... | diff --git a/src/request/plan.rs b/src/request/plan.rs
index ed13f17f..0b76f4b3 100644
--- a/src/request/plan.rs
+++ b/src/request/plan.rs
@@ -16,6 +16,7 @@ use crate::{
stats::tikv_stats,
store::RegionStore,
transaction::{resolve_locks, HasLocks},
+ util::iter::FlatMapOkIterExt,
Error, Result,
... | 5 | 5 | 3 | [{"id": "G0", "claim": "The PessimisticLockResponse merge should check whether any input is an error before always partitioning, which copies memory even in the success path.", "category": "performance", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The new RetryableMultiRegio... | null |
tikv__client-rust__360 | tikv/client-rust | 360 | defect | a1c4eda93861f4567e57361da5d6ee3eee03dacf | 1129c6f1183f78148c8577cbfffc42c39afa1778 | Optimize key_exists performance | In TiKV `scan` is a more costly operation than `get`, and `scan` can not take advantage of bloom filter, so use `get` will be more efficient. | diff --git a/src/raw/client.rs b/src/raw/client.rs
index da67c56a..b9ac740d 100644
--- a/src/raw/client.rs
+++ b/src/raw/client.rs
@@ -744,11 +744,11 @@ impl<PdC: PdClient> Client<PdC> {
}
fn assert_non_atomic(&self) -> Result<()> {
- (!self.atomic).then(|| ()).ok_or(Error::UnsupportedMode)
+ ... | 1 | 1 | 1 | [{"id": "G0", "claim": "The pull request should add a test covering the reworked key_exists implementation.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
tikv__client-rust__378 | tikv/client-rust | 378 | defect | 027a7dffd1d652679ab51ac5dd6e1e1005ea463e | 4d66413faf3ab433e3ce1ae8b12f7c8465a032c4 | txn: Resolve locks for async commit (region level) | ### Changes
- Add resolve locks (of region level) for async commit in GC scenario.
Note:
1. Resolve locks for async commit of request level is NOT done in this PR.
2. This PR mainly refer to [`LockResolver`](https://github.com/tikv/client-go/blob/v2.0.3/txnkv/txnlock/lock_resolver.go#L225) of `client-go`.
3. T... | diff --git a/src/kv/key.rs b/src/kv/key.rs
index 3d879c73..45d6f820 100644
--- a/src/kv/key.rs
+++ b/src/kv/key.rs
@@ -72,6 +72,12 @@ impl AsRef<Key> for kvrpcpb::Mutation {
}
}
+impl AsRef<Key> for kvrpcpb::LockInfo {
+ fn as_ref(&self) -> &Key {
+ self.primary_lock.as_ref()
+ }
+}
+
impl Key {
... | 5 | 3 | 1 | [{"id": "G0", "claim": "The AsRef<Key> impl for kvrpcpb::LockInfo should be avoided because the key it maps to is not the primary key.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "contains_start_bound is redundant with contains and its Excluded-bound b... | null |
tikv__client-rust__384 | tikv/client-rust | 384 | defect | 85c59fbe163758364baecf2e724b1582493ec5f3 | 7c0af13a7f3e576e8ccd6892a76d12bc777e701e | *: support rust-protobuf | Close #385
### Changes:
- Add feature `prost-codec` & `protobuf-codec` to select codec.
- Make code compatible with both `prost-codec` & `protobuf-codec`.
- Add tests for `protobuf-codec` in CI.
| diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 63b62602..e6bad3e2 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -10,6 +10,9 @@ jobs:
check:
name: check
runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ env: [ '', 'RUST_PROTOBUF=1' ]
steps:
... | 1 | 1 | 0 | [{"id": "G0", "claim": "The CI matrix jobs should use an explicit 'RUST_PROTOBUF=0' env entry instead of an empty env: \"env: [ 'RUST_PROTOBUF=0', 'RUST_PROTOBUF=1' ]\", applied to each job matrix (M002's 'Ditto' raises the same for the unit-test job).", "category": "testing", "verdict": "supported", "priority": "P2", ... | null |
tikv__client-rust__409 | tikv/client-rust | 409 | defect | 2761270f6d52fbb0c3efd65f7207ad176b131d1e | b3f1c5a880cf792cb39660595d9e6973270fb775 | fix raw scan | related issue: https://github.com/tikv/client-rust/issues/398
In this PR, I changed the behavior of Rawkv scan. Previously, it would send RPCs to multiple regions in parallel, which was not reasonable and could result in incorrect results. Now, I have changed it so that each RPC is only sent to one region at a time.... | diff --git a/src/common/errors.rs b/src/common/errors.rs
index 25245c57..251de71d 100644
--- a/src/common/errors.rs
+++ b/src/common/errors.rs
@@ -4,6 +4,8 @@ use std::result;
use thiserror::Error;
+use crate::BoundRange;
+
/// An error originating from the TiKV client or dependencies.
#[derive(Debug, Error)]
#... | 1 | 1 | 1 | [{"id": "G0", "claim": "This could panic if the server returns more keys than requested, since limit is only a soft limit.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}] | null |
tikv__client-rust__412 | tikv/client-rust | 412 | defect | 2c831bac149bd41760ac2aa2e31672319d6fb79d | 5d8660b21e7ee38f8e7f9c7eb7a64d8964f41423 | build: Make sure tikv-client works on stable rust | This PR add `rust-toolchain.toml` for this project to make sure all our development happen under the stable rust version.
> It would be ideal to have an MSRV policy, but it is not urgent. We can establish one once we have a sufficient user base. | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 78d15155..99318793 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -12,12 +12,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- - uses: actions-rs/toolchain@v1
- with:
- ... | 2 | 1 | 0 | [{"id": "G0", "claim": "Consider removing the commented-out style settings from rustfmt.toml entirely instead of leaving them commented out.", "category": "maintainability", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "A comment should be left in rustfmt.toml explaining that th... | null |
tikv__client-rust__441 | tikv/client-rust | 441 | defect | 6f9c13333fb4a3be97a04aa0f59c9971e312cba0 | dac55a7879a6af604d5368e0b2cff16be0889db5 | Adding a reverse scan API for raw client | Issue : https://github.com/tikv/client-rust/issues/440
Problem statement :
Adding a support for reverse scan public API in raw rust client.
Solution :
1. Added a new public API in raw client.
2. Add flag all the way through until new raw scan request is created. The [tikv service scan API](https://tikv.githu... | diff --git a/src/raw/client.rs b/src/raw/client.rs
index 109008abd..4d025a101 100644
--- a/src/raw/client.rs
+++ b/src/raw/client.rs
@@ -500,7 +500,40 @@ impl<PdC: PdClient> Client<PdC> {
/// ```
pub async fn scan(&self, range: impl Into<BoundRange>, limit: u32) -> Result<Vec<KvPair>> {
debug!("invok... | 5 | 5 | 1 | [{"id": "G0", "claim": "The comment above scan_reverse should be a doc comment (///) instead of a plain comment (//).", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The scan_reverse doc description (and the comments in tests) differs from TiKV's r... | null |
tikv__client-rust__501 | tikv/client-rust | 501 | defect | 7c78aadf44ca401237fcd1670576ff87223122ec | 669774e9ff2eec6c1ec0f5899106bc26eb7a0b7a | split batches for RawKV batch put / delete requests | Without the code fix, the new test will fail with
```
RegionError(Error { message: "raft entry is too large, region 8, entry size 107438290" ...
```
see https://github.com/tikv/client-rust/actions/runs/17204354874/job/48801577491?pr=502 | diff --git a/src/raw/requests.rs b/src/raw/requests.rs
index f6f32f3d..f9da7420 100644
--- a/src/raw/requests.rs
+++ b/src/raw/requests.rs
@@ -10,7 +10,6 @@ use crate::proto::tikvpb::tikv_client::TikvClient;
use crate::range_request;
use crate::region::RegionWithLeader;
use crate::request::plan::ResponseWithShard;
-... | 2 | 2 | 1 | [{"id": "G0", "claim": "The new raw_large_batch_put test should verify that the data written by batch_put is actually correct in TiKV.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Nit: building each test value with a push_str loop plus truncate is les... | null |
tikv__client-rust__92 | tikv/client-rust | 92 | defect | 91bc7f637f28e9d23e80e53b567d468c47b1a0e7 | 3522d33696e66d364d7423be928844adf8d622fa | Use a new TSO client implementation | As #89 mentioned, there is a bug in the current TSO client implementation. I feel it difficult to find out where the bug is and the old implementation uses the legacy tokio-core. Therefore, I decide to implement a new TSO client with futures 0.3 and async/await. I hope the implentation is now more efficient (more relia... | diff --git a/.travis.yml b/.travis.yml
index 82eaad6f..ed763aca 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -45,4 +45,4 @@ script:
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then docker ps; fi
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then docker logs pd; fi
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then docker logs k... | 11 | 7 | 2 | [{"id": "G0", "claim": "Asks why the integration test configuration takes multiple PD addresses (PD_ADDRS) rather than one.", "category": "design", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The Tso struct should use a more self-explanatory name such as TimestampOracle.", "... | null |
tikv__fail-rs__11 | tikv/fail-rs | 11 | defect | 6a92d26dc04dc82359bbb73320caba9c5e9c3024 | 4cdb3af425a56854a5d9c9aaeab3d4a8bea1f2f5 | Remove mod paths in failpoints name | Currently, module paths are added to fail points name automatically.
So the actual name differs from the declaration and changes whenever we move the module that contains fail points.
This PR remove mod paths. | diff --git a/README.md b/README.md
index 2786389..c3010e3 100644
--- a/README.md
+++ b/README.md
@@ -47,7 +47,7 @@ fn function_conditional(enable: bool) {
Trigger a fail point via the environment variable:
```
-$ FAILPOINTS=bar::foo=panic cargo run
+$ FAILPOINTS=foo=panic cargo run
```
In unit tests:
@@ -55,7 +... | 4 | 3 | 1 | [{"id": "G0", "claim": "Since the pull request removes module paths from fail point names, the README should add a caveat telling users to be careful about using the same fail point name.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Removing mod... | null |
tikv__fail-rs__15 | tikv/fail-rs | 15 | defect | c77a7896fc800ddda6cf8fd9d94e15223a89bb84 | c55f4220b4e4bc762b086f9429e574b6c2cebc13 | Refine CI script to ensure correctness. | Based off https://github.com/pingcap/raft-rs/pull/117 | diff --git a/.travis.yml b/.travis.yml
index 603583c..8b68b72 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,18 +1,29 @@
-dist: trusty
-sudo: false
language: rust
-os:
- - linux
- - osx
+sudo: false
+env:
+ global:
+ - RUST_BACKTRACE=1
+ - RUSTFLAGS="-D warnings"
+cache: cargo
+
rust:
- - stable
- - beta... | 1 | 1 | 1 | [{"id": "G0", "claim": "The `pause` action should make a thread sleep at the fail point instead of busy-looping, as the referenced fail(3) spec says.", "category": "performance", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
tikv__fail-rs__37 | tikv/fail-rs | 37 | defect | 92c37a18545d000e443fec54c69252466eb3a44f | 1c34fc7caa7436f8cfb8d20173c1df0a8ec2c22f | cargo: add a "failpoints" feature | Breaking: this changes the library behavior, disabling code
generation (in macro) by default.
It introduces a `failpoints` Cargo feature that consumers
should only enable where relevant (e.g. in testing environments).
Transitive consumers of this library can enable this feature too,
with the special name `fail... | diff --git a/Cargo.toml b/Cargo.toml
index 61ea4d6..19cc1af 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -18,8 +18,11 @@ lazy_static = "1.2"
rand = "0.6"
[features]
-no_fail = []
+failpoints = []
[badges]
travis-ci = { repository = "pingcap/fail-rs" }
appveyor = { repository = "busyjay/fail-rs" }
+
+[package.me... | 3 | 1 | 1 | [{"id": "G0", "claim": "Make `failpoints` the default feature, so dependents get failpoints unless they opt out with `default-features = false`.", "category": "design", "verdict": "opposed", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "All the CI configuration files need to be updated so tests also ... | null |
tikv__fail-rs__66 | tikv/fail-rs | 66 | defect | 6645f1767b4d0adbe454a07c25e30224b1b08dbd | 7b9c6cca8c194c31c42d8fb8b0a9d1e9efa48a98 | Fix recursive macro invocation | The PR is split in two commits: the fix and a test for it. Feel free to remove the test commit if you think it's not needed | diff --git a/src/lib.rs b/src/lib.rs
index 4c5a63b..f23cc44 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -838,7 +838,7 @@ macro_rules! fail_point {
}};
($name:expr, $cond:expr, $e:expr) => {{
if $cond {
- fail_point!($name, $e);
+ $crate::fail_point!($name, $e);
}
}... | 2 | 2 | 0 | [{"id": "G0", "claim": "The new test file's copyright header should say 2022 instead of 2019.", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The test file should be named \"no_use_import.rs\" rather than \"no_use_import_tests.rs\".", "category": "... | null |
tikv__fail-rs__8 | tikv/fail-rs | 8 | defect | 7aabbc27a8599bc38dfa54008b088b18ec58dde7 | f061be3ab983b5815c4f4030fca713635f6264dc | Simplify fail_point usage | For pattern ($name:expr), marco fail_point can be added to any
function, though the drawback is it does not support Retrun action. | diff --git a/src/lib.rs b/src/lib.rs
index 3cf7a9c..fb98371 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -34,7 +34,7 @@
//! extern crate fail;
//!
//! fn f1() {
-//! fail_point!("example");
+//! fail_point!("example", |_| {});
//! panic!();
//! }
//!
@@ -427,32 +427,34 @@ fn set(
/// fail_point!("... | 3 | 3 | 2 | [{"id": "G0", "claim": "The new doc for the fail_point!($name) shortcut is inaccurate: the return action serves both returning early and returning a specified value, not just avoiding a customized value.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim... | null |
tikv__grpc-rs__161 | tikv/grpc-rs | 161 | defect | ae65cf32a8ba0f554f96218ece555783c9ddc1fa | a346b4687cde5c11759cd8653566b34d22275beb | *: implement request header support | This pr adds support to customize request headers. We need it to examine cluster id in TiKV.
close #135 | diff --git a/grpc-sys/grpc_wrap.c b/grpc-sys/grpc_wrap.c
index 2847e043f..e0dd841e9 100644
--- a/grpc-sys/grpc_wrap.c
+++ b/grpc-sys/grpc_wrap.c
@@ -160,55 +160,69 @@ grpcwrap_metadata_array_destroy_full(grpc_metadata_array *array) {
}
/*
- * Creates an empty metadata array with given capacity.
- * Array can later ... | 8 | 6 | 4 | [{"id": "G0", "claim": "grpcwrap_metadata_array_init should initialize count and capacity properly too, not leave them unset.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The name `freeze` is not intuitive; consider renaming it to `shrink_to_fit` ... | null |
tikv__grpc-rs__166 | tikv/grpc-rs | 166 | defect | 3110b36c085e1d6dee14189bfe0a894430f66f3c | 795611048f3fa5a3232177a9008be1ac5386fe1e | Cancel RPC when senders and receivers are dropped | So we will not accidentally leak gRPC calls.
Cc https://github.com/pingcap/grpc-rs/issues/150 | diff --git a/interop/src/client.rs b/interop/src/client.rs
index 877051750..c4bf9cf18 100644
--- a/interop/src/client.rs
+++ b/interop/src/client.rs
@@ -62,7 +62,8 @@ impl Client {
(req, WriteFlags::default())
});
let (sender, receiver) = self.client.streaming_input_call().unwrap();
- ... | 5 | 5 | 1 | [{"id": "G0", "claim": "StreamingCallSink's Drop impl should check whether the sink was explicitly closed instead of unconditionally cancelling the RPC when dropped.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The server sink's drop logic should ... | null |
tikv__grpc-rs__177 | tikv/grpc-rs | 177 | defect | d119e6f7f7943bc3e6910a2c5f3cd9d6b1abca28 | 81006fc5f324468b7cc1ff975fd647cc0c276c86 | Get client's address on server side | We can log client's adress after this PR.
CC @AndreMouche | diff --git a/grpc-sys/grpc_wrap.c b/grpc-sys/grpc_wrap.c
index 9ac767ebe..356fe6c76 100644
--- a/grpc-sys/grpc_wrap.c
+++ b/grpc-sys/grpc_wrap.c
@@ -355,9 +355,9 @@ grpcwrap_batch_context_recv_status_on_client_trailing_metadata(
}
GPR_EXPORT grpc_call *GPR_CALLTYPE
-grpcwrap_request_call_context_take_call(grpcwrap_... | 2 | 1 | 0 | [{"id": "G0", "claim": "The name of the new test module `etc` is unclear and should be renamed to something more descriptive such as `util` or `misc`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Asks whether a `Call` can live longer than its ... | null |
tikv__grpc-rs__216 | tikv/grpc-rs | 216 | defect | 1ecf788115c967657e358783ee853ed3e3154471 | a116938798d13cde2a080a384d66264a0c05e78f | *: fix soundness of service handler | We use Send + Clone pattern to achieve concurrency without lock.
However our service handler registry treat them as if it's Send + Sync,
which will lead to data race. | diff --git a/src/async/callback.rs b/src/async/callback.rs
index ab2884981..01f49059f 100644
--- a/src/async/callback.rs
+++ b/src/async/callback.rs
@@ -11,20 +11,19 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-use std::sync::Arc;
use call::{BatchCo... | 9 | 4 | 0 | [{"id": "G0", "claim": "The new `ctx` field on `Server` should be named `core` instead, because there are already so many `ctx`s in the crate.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The doc comment on RequestCallContext misspells \"guran... | null |
tikv__grpc-rs__217 | tikv/grpc-rs | 217 | defect | 3aab8fa1d4230470ff271ff343757bba3c888e17 | f219685e79f6485b9526802cbb7bab5566ec78c4 | Kick completion queue via call | This PR replace alarm with call.
Resolves #213 | diff --git a/grpc-sys/grpc_wrap.c b/grpc-sys/grpc_wrap.c
index 44eff2785..bc276cce8 100644
--- a/grpc-sys/grpc_wrap.c
+++ b/grpc-sys/grpc_wrap.c
@@ -762,6 +762,16 @@ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcwrap_call_send_initial_metadata(
NULL);
}
+/** Kick call's completion queue... | 9 | 8 | 3 | [{"id": "G0", "claim": "The new notify path hides what happens to a tag when the completion queue is already shutdown; the caller of notify should handle/report the queue-shutdown case explicitly.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Kicke... | null |
tikv__grpc-rs__354 | tikv/grpc-rs | 354 | defect | 1db67969532d171cb64e9d81f5ba8e3bcc6d23af | a502d37cb3caa409b3e0ec80b2a3c1810ca6d7ff | grpcio: wrap the grpc status code | Give the variable a more descriptive name so we know what kind of a code it is and what the valid values are. Leave grpc-sys untouch and define the type `RpcStatusCode` in grpcio itself. | diff --git a/benchmark/src/bench.rs b/benchmark/src/bench.rs
index e4770a994..cddef2f45 100644
--- a/benchmark/src/bench.rs
+++ b/benchmark/src/bench.rs
@@ -63,10 +63,7 @@ impl BenchmarkService for Benchmark {
_: RequestStream<SimpleRequest>,
sink: ClientStreamingSink<SimpleResponse>,
) {
- ... | 5 | 5 | 0 | [{"id": "G0", "claim": "Question whether the From<i32> impl is needed; without it the type could guarantee that RpcStatusCode only holds valid values.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The #[allow(dead_code)] on the generated constants is un... | null |
tikv__grpc-rs__41 | tikv/grpc-rs | 41 | defect | 1aeb34fac8e728f7484cd7aa9ac1c533cb4e9899 | c17133f508aa70ea7cc3c2a3fd7cd37939c71633 | add Interoperability test suit | ref: https://github.com/grpc/grpc/blob/v1.3.x/doc/interop-test-descriptions.md | diff --git a/.travis.yml b/.travis.yml
index 443d6fc73..68a6bba0a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -32,7 +32,7 @@ before_script:
- export PKG_CONFIG_PATH="$HOME/.cache/lib/pkgconfig"
- if [[ $TRAVIS_RUST_VERSION == "stable" ]] && [[ $TRAVIS_OS_NAME == "linux" ]]; then which rustfmt || cargo install r... | 3 | 2 | 1 | [{"id": "G0", "claim": "The client should match known-but-unimplemented cases (e.g. cacheable_unary) and print a message like \"cacheable_unary is not implemented yet\" instead of falling into the generic unknown-case panic.", "category": "design", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": ... | null |
tikv__grpc-rs__514 | tikv/grpc-rs | 514 | defect | 0a73f73c5c24e0df8d588f7d58292c2efd6d31dd | c956fb535fa5987ea3b77f362ec4b3826a326ee3 | *: support rich error | It's a common practice to return a protobuf struct as error status
instead of simple string. This PR adds complete rich error support
by following C++'s implementations. It changes several APIs to make
code clean and match other languages' design.
For more informations about rich error model, you can also take a
... | diff --git a/benchmark/src/bench.rs b/benchmark/src/bench.rs
index baea303bd..0a8d0a0e2 100644
--- a/benchmark/src/bench.rs
+++ b/benchmark/src/bench.rs
@@ -79,7 +79,7 @@ impl BenchmarkService for Benchmark {
_: SimpleRequest,
sink: ServerStreamingSink<SimpleResponse>,
) {
- let f = sink.f... | 6 | 3 | 0 | [{"id": "G0", "claim": "The Display output for RpcFailure should keep the old format instead of printing the obscure `binary: true/false` part and the error_details, since their presence can't be retrieved again and printing them is too noisy.", "category": "maintainability", "verdict": "supported", "priority": "P2", "... | null |
tikv__pprof-rs__116 | tikv/pprof-rs | 116 | defect | e6b48867b8cc8881ce0b3c0750e409b4c5af91d1 | e7228d26f5f02a11c32b9e0ef83969559b5b9499 | Unwind through frame pointer | Add the feature to unwind through frame pointer in `pprof-rs`.
The frame pointer has much better performance and stability. The only problem is that we cannot ensure every components have correct frame pointer. During my testing, I have met several problems:
1. The rust std binary, doesn't have a correct frame po... | diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 299af1d7..b79e23fb 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -79,6 +79,13 @@ jobs:
command: build
args: --features flamegraph,protobuf-codec --target ${{ matrix.target }}
+ - name: R... | 10 | 7 | 4 | [{"id": "G0", "claim": "The thread name is missing from the root of the profiling result under tpcc, which loses sometimes-useful information.", "category": "correctness", "verdict": "opposed", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "The flame graph produced by frame-pointer based profiling o... | null |
tikv__raft-engine__131 | tikv/raft-engine | 131 | defect | 3492a18dd3b6467b8c338c4140ddce471e39e4d0 | 751965d6730aa8085d2cf8bf342b2fef4c8e289d | rollback to a consistent state after fsync error | Make `PipeLog` try to rollback to a consistent state after fsync error.
According to [PostgreSQL's fsync() surprise](https://lwn.net/Articles/752063/), `fsync` is not retriable. We must make pipe log rollback to where it last synced.
## What's changed?
**invariant: non-active log files are always synced and sa... | diff --git a/src/engine.rs b/src/engine.rs
index ac0d98bd..43546887 100644
--- a/src/engine.rs
+++ b/src/engine.rs
@@ -391,30 +391,34 @@ where
let (file_id, offset) = {
let mut writer = Writer::new(log_batch as &_, sync);
if let Some(mut group) = self.write_barrier.enter(&mut writer) ... | 9 | 7 | 3 | [{"id": "G0", "claim": "The sync/rotate necessity checks performed inside `append` should be done in `post_write` instead.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "When `last_sync == 0` and `written == LOG_FILE_HEADER_LEN`, an fsync error should be... | null |
tikv__raft-engine__206 | tikv/raft-engine | 206 | defect | 2d1f8fcf7f2b0a3b304330bd3908a34a5e52af81 | 3dca1f52101b070c4970184c6b50b8312f0110d6 | Reduce size of `EntryIndex` | Ref #205
Some enhancements:
- Do not store log index inside `EntryIndex`.
- Reduce entry offset and entry len from u64 to u32. It won't cause regression because the length is already limited by compression (i32::MAX).
Size for one `EntryIndex` is reduced from 64 bytes to 48 bytes (25%).
stress benchmarks sho... | diff --git a/src/engine.rs b/src/engine.rs
index d8e88c48..4b7524a5 100644
--- a/src/engine.rs
+++ b/src/engine.rs
@@ -436,7 +436,7 @@ where
}
let e = parse_from_bytes(
&cache.block.borrow()
- [idx.entry_offset as usize..idx.entry_offset as usize + idx.entry_len],
+ ... | 2 | 1 | 0 | [{"id": "G0", "claim": "The consistency_check code was commented out rather than deleted, and the reviewer asks why.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "MemTable could wrap ThinEntryIndex directly instead of keeping a separate EntryIn... | null |
tikv__raft-engine__249 | tikv/raft-engine | 249 | defect | ee024c75b9382f7123105996dd7acde5c88d0865 | a1be4833d11e5d19ab215198ec7dc0bd85aa634f | Support reading block based log format | ## PR Description
For closing #246, this pr is set. This pr is used for building basics for the new DIO feature, including:
* [New] DataLayout, representing the arrangement on data (records), in alignment or not.
* Refactor LogFileFormat / LogFileContext.
* Add extra support in `stress` tool for the new `alignme... | diff --git a/src/config.rs b/src/config.rs
index cb8e2170..b969d8d3 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -3,7 +3,7 @@
use log::warn;
use serde::{Deserialize, Serialize};
-use crate::pipe_log::Version;
+use crate::pipe_log::{DataLayout, Version};
use crate::{util::ReadableSize, Result};
const MIN_RE... | 11 | 10 | 6 | [{"id": "G0", "claim": "More unit tests are needed to cover the abnormal code paths of the new log format handling.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The pull request still lacks compatibility with fragmented records, which should be recons... | null |
tikv__raft-engine__265 | tikv/raft-engine | 265 | defect | 62a69a8774fa28225b9d6620a20e2d8108a6cba5 | 5480da7d8fdf1381ef6ce7578d63be92699b844a | Default enable log recycling | ## Description
Default enable log recycling. Close #263.
Signed-off-by: Lucasliang <nkcs_lykx@hotmail.com> | diff --git a/src/config.rs b/src/config.rs
index 82770799..7ae133fe 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -57,7 +57,7 @@ pub struct Config {
/// Version of the log file.
///
- /// Default: 1
+ /// Default: 2
pub format_version: Version,
/// Target file size for rotating log fil... | 1 | 1 | 0 | [{"id": "G0", "claim": "The pull request's behavior change (log recycling enabled by default) should be documented in CHANGELOG.md under a 'Behavior changes' section.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
tikv__raft-engine__269 | tikv/raft-engine | 269 | defect | 9751c6dd5c20a056570c9fbfe62bad6e0d585094 | 0b0f45e3c31fd4f1a5b5997a32890fe6a55dde3e | hide more file writing details from engine | This is a preparing work for #258.
Changes:
- Move `fsync` to file handle instead of writer, so that we can call it concurrently in the future. In doing so, we have to remove the sync offset tracking and deprecate `bytes_per_sync` support
- Move `prepare_write` into pipe_log. Introduce a trait `ReactiveBytes` for ... | diff --git a/src/config.rs b/src/config.rs
index 7ae133fe..5851cb71 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -49,11 +49,12 @@ pub struct Config {
///
/// Default: "8KB"
pub batch_compression_threshold: ReadableSize,
+ /// Deprecated.
/// Incrementally sync log files after specified bytes... | 1 | 1 | 0 | [{"id": "G0", "claim": "The new `SinglePipe::sync` still acquires the mutex at the start, and the reviewer asks whether, according to #258, it will be refactored in later work to support concurrent access — e.g. replacing the mutex with an RwLock or adding an extra `F::Handle` in `SinglePipe` so it can be called concur... | null |
tikv__raft-rs__120 | tikv/raft-rs | 120 | defect | b10d74ced67f57e7a591ecc590991b616e4ec570 | 3aa090ce665457d012da6561ac803c58ad5eabdc | refactor(Ready): add pub getters and make fields private | Fixes #90 | diff --git a/examples/single_mem_node/main.rs b/examples/single_mem_node/main.rs
index cae1ec80f..ae9b88afc 100644
--- a/examples/single_mem_node/main.rs
+++ b/examples/single_mem_node/main.rs
@@ -115,31 +115,30 @@ fn on_ready(r: &mut RawNode<MemStorage>, cbs: &mut HashMap<u8, ProposeCallback>)
}
// The Raf... | 4 | 3 | 2 | [{"id": "G0", "claim": "The PR breaks API compatibility, so the crate version needs to be upgraded too.", "category": "release", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new read-only committed_entries/messages getters force users to clone the memory when handling ent... | null |
tikv__raft-rs__122 | tikv/raft-rs | 122 | defect | 19d932e28767e970ec258bf6e180bdcfb46edeaf | 7ee50eabe61e089171a834a4fec05ade357dbb7c | Change return type of Raft::new() to Result | This allows a `ConfigInvalid` error to propogate up and let user handle it.
Fixes #94
| diff --git a/src/raft.rs b/src/raft.rs
index 11dd57065..3e1f8a0d9 100644
--- a/src/raft.rs
+++ b/src/raft.rs
@@ -223,8 +223,8 @@ pub fn quorum(total: usize) -> usize {
impl<T: Storage> Raft<T> {
/// Creates a new raft for use on the node.
- pub fn new(c: &Config, store: T) -> Raft<T> {
- c.validate().... | 2 | 2 | 2 | [{"id": "G0", "claim": "In Raft::new, `store.initial_state().expect(\"\")` should use `?` as well instead of an `expect()`, so the storage error is propagated like the config error.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The benchmarks were ... | null |
tikv__raft-rs__183 | tikv/raft-rs | 183 | defect | 311b3b53ba8e21a60d2cf00dfeeb024cfed1d679 | 42fa99f237f96181ca20f5be8706f2c2e3875911 | Converts the `max_size` argument in `Storage::entries` to an `Option<u64>` | Closes #98 | diff --git a/src/raft.rs b/src/raft.rs
index 7079dfd63..dede272fe 100644
--- a/src/raft.rs
+++ b/src/raft.rs
@@ -34,7 +34,7 @@ use rand::{self, Rng};
use super::errors::{Error, Result, StorageError};
use super::progress::{CandidacyStatus, Progress, ProgressSet, ProgressState};
-use super::raft_log::{self, RaftLog};... | 6 | 5 | 1 | [{"id": "G0", "claim": "The test should use unwrap() instead of expect(\"\") (raised as the question 'Why not use unwrap() here?').", "category": "maintainability", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The Storage::entries doc could be shortened to the suggested wording... | null |
tikv__raft-rs__225 | tikv/raft-rs | 225 | defect | aa131db1ba95166501c1cf5b8d90cd7c7bde2308 | f1b91f2a7b9f5067aa02817db39db1d086080ae1 | Check pending conf change before campaign | Fix #221.
This is a fix for 0.4.x, I will do the fix for master later. | diff --git a/examples/single_mem_node/main.rs b/examples/single_mem_node/main.rs
index 2b62a7286..cae1ec80f 100644
--- a/examples/single_mem_node/main.rs
+++ b/examples/single_mem_node/main.rs
@@ -196,7 +196,8 @@ fn send_propose(sender: mpsc::Sender<Msg>) {
cb: Box::new(move || {
s... | 4 | 1 | 1 | [{"id": "G0", "claim": "The reviewer asks whether the new test can fail if the transfer-leader path does not call `self.hub(true)` — i.e. whether the test actually exercises the fix.", "category": "testing", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Criterion's API appears t... | null |
tikv__raft-rs__263 | tikv/raft-rs | 263 | defect | 5ffa60ef29e6c81569e5caf4d2641a5b9c2d6952 | e6d98a4ce826b2a4ab27ffb12aa4bdaf09805dd6 | Cherry pick all 0.4.x | task list:
- [x] cherry pick all commits from 0.4.x to master
- [x] fix all test cases | diff --git a/proto/proto/eraftpb.proto b/proto/proto/eraftpb.proto
index 664a4fea7..d09a93af8 100644
--- a/proto/proto/eraftpb.proto
+++ b/proto/proto/eraftpb.proto
@@ -73,6 +73,7 @@ message Message {
repeated Entry entries = 7;
uint64 commit = 8;
Snapshot snapshot = 9;
+ uint64 request_snapshot = 13;... | 4 | 1 | 0 | [{"id": "G0", "claim": "Two commits are empty and the 'Bump to v0.4.3' commit message does not reflect its contents, so the commits should be a bit more organised (though the reviewer does not feel strongly if the descriptions match the 0.4.x branch).", "category": "maintainability", "verdict": "opposed", "priority": "... | null |
tikv__raft-rs__346 | tikv/raft-rs | 346 | defect | 8942a7ff88c9642708ddf51e98bb741949c65121 | faefab33fda41b08e39f65bfbe5e18026da95fc0 | advance commit index by MsgReadIndexResp | Signed-off-by: linning <linningde25@gmail.com>
Leader only handle `MsgReadIndex` when it has committed log entry in its term and the read index this leader returned always be its commit index , so log entries at the read index are always proposed and committed by this leader at its term, so if the follower's log entry... | diff --git a/src/raft.rs b/src/raft.rs
index 643bc0563..d8fdd8168 100644
--- a/src/raft.rs
+++ b/src/raft.rs
@@ -1826,6 +1826,7 @@ impl<T: Storage> Raft<T> {
request_ctx: m.take_entries()[0].take_data(),
};
self.read_states.push(rs);
+ self.raft_log.... | 2 | 2 | 2 | [{"id": "G0", "claim": "Any tests to cover advancing the commit index from a MsgReadIndexResp (the new maybe_commit call on read_states)?", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The term passed to maybe_commit may be wrong: log entry in the leade... | null |
tikv__raft-rs__361 | tikv/raft-rs | 361 | defect | c2945e18b4111d28633e07fead2fd8b04d66ce45 | 967427cd047f928debd00e58f067ef17d382622b | Consider priority during election | Fixes #68
Add a priority to Raft. Election rules have also changed. Followers vote first for the candidate with more logs. With the same log, the followers vote for the candidate whose priority was no less than their own. The default priority is 0 and can be set through the interface within RawNode. And some tests ha... | diff --git a/harness/tests/integration_cases/test_raft.rs b/harness/tests/integration_cases/test_raft.rs
index 35d4ec6b8..17874071e 100644
--- a/harness/tests/integration_cases/test_raft.rs
+++ b/harness/tests/integration_cases/test_raft.rs
@@ -4724,3 +4724,132 @@ fn test_request_snapshot_on_role_change() {
nt... | 7 | 6 | 1 | [{"id": "G0", "claim": "Priority should only be set for request-vote messages, not attached to every outgoing message via the new_message parameter.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "In test_set_priority the loop should be `for p in prioriti... | null |
tikv__raft-rs__366 | tikv/raft-rs | 366 | defect | 513b82ce4507747a678fee7b4405c8b8b106fc12 | cfe5f377b84b310204015b9df9ccaf26b1434085 | add committed index in Progress | Close #325
- [X] Commit index won't step backward.
- [X] Log rejection should not change commit index
- [X] Successfully Append should update commit index
- [x] Heartbeat should update commit index
Signed-off-by: accelsao <bebe8277@gmail.com> | diff --git a/harness/tests/integration_cases/test_raft.rs b/harness/tests/integration_cases/test_raft.rs
index 58b906495..eaea34135 100644
--- a/harness/tests/integration_cases/test_raft.rs
+++ b/harness/tests/integration_cases/test_raft.rs
@@ -212,6 +212,121 @@ fn test_progress_update() {
}
}
+#[test]
+fn test... | 6 | 6 | 2 | [{"id": "G0", "claim": "The table-driven test the author added for committed index is useless and should be reworked into something meaningful.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The travis step `cargo fmt --all -- --check` exits with 1 on t... | null |
tikv__raft-rs__391 | tikv/raft-rs | 391 | defect | eec5ead3ebe8f790154c94cb5f5adb0063a674e9 | f0baff90b54a1d7da68399d0cb9c728e06ae12f5 | datadriven: add rewrite mode | 1. add rewrite
2. don't trim on expected value (bug)
3. move the test to independent file
| diff --git a/datadriven/src/datadriven.rs b/datadriven/src/datadriven.rs
index 6d62a9b39..0433e0561 100644
--- a/datadriven/src/datadriven.rs
+++ b/datadriven/src/datadriven.rs
@@ -1,8 +1,15 @@
+#[cfg(test)]
+mod datadriven_test;
+
+use crate::get_dirs_or_file;
use crate::test_data::TestData;
use crate::test_data_rea... | 9 | 9 | 4 | [{"id": "G0", "claim": "The added testdata/multiline file contains a blank line (after 'of') that is not present in the original test data.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "rewrite_buffer should be defined as Option<String> rather than... | null |
tikv__raft-rs__42 | tikv/raft-rs | 42 | defect | ba7ddfd7fc02d12e7a336278d22ee563670f108a | 9d2eeacaea6a37547684b0da61beb6cd79e81aef | fix deadlock during prevote migration process | Fixes #20 | diff --git a/src/raft.rs b/src/raft.rs
index cb19891b8..d9736eedb 100644
--- a/src/raft.rs
+++ b/src/raft.rs
@@ -224,7 +224,7 @@ pub struct Raft<T: Storage> {
heartbeat_elapsed: usize,
pub check_quorum: bool,
- pre_vote: bool,
+ pub pre_vote: bool,
skip_bcast_commit: bool,
heartbeat_timeou... | 12 | 11 | 0 | [{"id": "G0", "claim": "Use assert_eq! instead of if-and-panic blocks when checking peer states and terms in the new prevote-migration tests.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Format the new code with the project's rustfmt (cargo fm... | null |
tikv__raft-rs__421 | tikv/raft-rs | 421 | defect | 7e7322b6afab1bb0b761c5b6b03aa4a6dea2addf | 7e8c08e72e0db03f53ad996b4b1207cb4e40ead8 | Fix some typos in code and comments | Fix some typos while reading the lib.
One in `src/tracker/state.rs`, **ProgressState::Snapshot => write!** should be **StateSnapshot**.
```rust
impl Display for ProgressState {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
match self {
ProgressState::Probe => write!(f, "StatePr... | diff --git a/datadriven/src/lib.rs b/datadriven/src/lib.rs
index 4be5d1b00..619d37fc0 100644
--- a/datadriven/src/lib.rs
+++ b/datadriven/src/lib.rs
@@ -40,7 +40,7 @@ The path tree looks like the following:
└── data_002.txt
```
-The comparision is done by [difference](https://docs.rs/difference/2.0.0/di... | 1 | 1 | 0 | [{"id": "G0", "claim": "The doc comment on is_continuous_ents should read 'i.e msg's next entry index should be equal to the index of the first entry in `ents`' instead of the ambiguous 'the first entries' index'.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
tikv__raft-rs__465 | tikv/raft-rs | 465 | defect | 3970a47206c75aa3f7530a5551efd1731a540904 | e86497f6be504089ec4aab06799b907b42f084a5 | Ignore async entries when leadership or term is changed | To make raft-rs robust, when calling `on_entries_fetched`, ignore the entries when leadership or term is changed. Otherwise , it may cause potential panics in `send_append`. | diff --git a/harness/tests/integration_cases/test_raw_node.rs b/harness/tests/integration_cases/test_raw_node.rs
index dae5a9fc0..031a0d009 100644
--- a/harness/tests/integration_cases/test_raw_node.rs
+++ b/harness/tests/integration_cases/test_raw_node.rs
@@ -986,6 +986,61 @@ fn test_raw_node_with_async_entries_to_rem... | 2 | 2 | 1 | [{"id": "G0", "claim": "The term/leadership check added in on_entries_fetched should be placed before the removed-peer check at line 427, since a role change implies a term change.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "A leader can step down via... | null |
tikv__raft-rs__537 | tikv/raft-rs | 537 | defect | 65a00620d80a89603c3358fd4b90265a692ae767 | 1fd38fe61394e641c210283324b593f0e934f11e | allow raft apply committed logs before they are persisted | ref: tikv/tikv#16457, https://github.com/tikv/tikv/issues/16717
Design doc: https://github.com/tikv/rfcs/pull/112
As `committed` means more than quorum node are persisted, which no data loss even if all other node are down. So in this situation, it is safe to apply this log even if it is still not persisted.
... | diff --git a/examples/single_mem_node/main.rs b/examples/single_mem_node/main.rs
index 8ef7c578f..c60637f4b 100644
--- a/examples/single_mem_node/main.rs
+++ b/examples/single_mem_node/main.rs
@@ -6,7 +6,6 @@ use std::sync::mpsc::{self, RecvTimeoutError};
use std::thread;
use std::time::{Duration, Instant};
-use ra... | 10 | 6 | 1 | [{"id": "G0", "claim": "The config value should be passed to RaftLog::new instead of being assigned to r.raft_log.apply_unpersisted_log_limit afterwards.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "A test case should be added for applied > last index ... | null |
tikv__raft-rs__540 | tikv/raft-rs | 540 | defect | 65a00620d80a89603c3358fd4b90265a692ae767 | 03992175ef385b8d07b11ca60a31a49094ca22b4 | Fix the compile error while running the cargo clippy | I ran the instruction `cargo clippy --all --all-targets -- -D clippy::all` according to the README and got below error:
```
❯ cargo clippy --all --all-targets -- -D clippy::all
Checking harness v0.1.0 (/Users/hulk/code/rust/raft-rs/harness)
error: you seem to use `.enumerate()` and immediately discard the ind... | diff --git a/harness/tests/integration_cases/test_raft.rs b/harness/tests/integration_cases/test_raft.rs
index 180cc5e8c..f357b7edc 100644
--- a/harness/tests/integration_cases/test_raft.rs
+++ b/harness/tests/integration_cases/test_raft.rs
@@ -5301,7 +5301,7 @@ fn test_election_with_priority_log() {
(false, f... | 2 | 1 | 1 | [{"id": "G0", "claim": "The PR author's Rust toolchain version should be pinned, perhaps by adding a rust-toolchain file or a package.rust-version field in Cargo.toml.", "category": "maintainability", "verdict": "uncertain", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "Fix the additional cargo cli... | null |
tikv__raft-rs__552 | tikv/raft-rs | 552 | defect | 2aefbf627f243dd261b7585ef1250d32efd9dfe7 | bced3c25ebae54f9345c76053da4c39f6ee8801a | feat: add disable_proposal_forwarding config params | resolve #550 | diff --git a/harness/tests/integration_cases/test_raft.rs b/harness/tests/integration_cases/test_raft.rs
index a62266d27..f6fb31d8b 100644
--- a/harness/tests/integration_cases/test_raft.rs
+++ b/harness/tests/integration_cases/test_raft.rs
@@ -5851,3 +5851,123 @@ fn test_switching_check_quorum() {
}
assert_e... | 4 | 4 | 0 | [{"id": "G0", "claim": "Place the new disable_proposal_forwarding field near the other bool field definitions in RaftCore instead of after max_committed_size_per_ready.", "category": "design", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The new test_disable_proposal_forwardi... | null |
tikv__raft-rs__579 | tikv/raft-rs | 579 | defect | 1fd05e000fb094015507c5c985849d370100fb72 | acccd2b7e633309e611ae7506d4d905f21d2296f | remove protobuf dependency with `prost-codec` feature | The motivation is that protobuf v2 is vulnerable to RUSTSEC-2024-0437.
`prost::Message` is not 100% the same as `protobuf::Message` but it's not impossible to present a common interface for the needs of this crate.
This change is a breaking change.
<!-- This is an auto-generated comment: release notes by coderab... | diff --git a/Cargo.toml b/Cargo.toml
index 2bcf72720..2476e6352 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -19,17 +19,15 @@ members = ["proto", "harness", "datadriven"]
default = ["protobuf-codec", "default-logger"]
# Enable failpoints
failpoints = ["fail/failpoints"]
-protobuf-codec = ["raft-proto/protobuf-codec",... | 9 | 4 | 1 | [{"id": "G0", "claim": "A brief doc comment should be added explaining that in `protobuf-codec` mode `PbMessageExt` is empty because `protobuf::Message` already provides `compute_size`, `merge_from_bytes` and `write_to_bytes` under the same names.", "category": "documentation", "verdict": "uncertain", "priority": "P2",... | null |
tikv__raft-rs__58 | tikv/raft-rs | 58 | defect | 8652e1c8e6cccb4705e3e40d1247dd22c7d60076 | d2c8ff54adc3de9ea4d72f750cfb037c719d5d12 | Learner needs to respond vote requests. | So that if some voters fail, rest voters and learners can still form a quorum. Fix #57 . | diff --git a/src/raft.rs b/src/raft.rs
index e5ea4a865..c5e275cd0 100644
--- a/src/raft.rs
+++ b/src/raft.rs
@@ -27,16 +27,16 @@
use std::cmp;
-use rand::{self, Rng};
use eraftpb::{Entry, EntryType, HardState, Message, MessageType, Snapshot};
use fxhash::FxHashMap;
use protobuf::repeated::RepeatedField;
+use ra... | 7 | 5 | 0 | [{"id": "G0", "claim": "The learner/voter string this PR adds to the log_vote_approve log message is redundant and should be dropped.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new test's comment misspells MsgRequestVote as 'MsgRequeestV... | null |
tikv__raft-rs__580 | tikv/raft-rs | 580 | defect | 1fd05e000fb094015507c5c985849d370100fb72 | ad126a653fc8a36fea322d3243d587de339fd65d | fix clippy warnings | generated by
```
cargo clippy --all --all-targets --fix
```
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **Style**
* Standardized user-facing and diagnostic message formatting across the codebase to use consistent interpolation, improving readability of lo... | diff --git a/benches/suites/raft.rs b/benches/suites/raft.rs
index 8e36d23c6..7380c231b 100644
--- a/benches/suites/raft.rs
+++ b/benches/suites/raft.rs
@@ -29,7 +29,7 @@ fn quick_raft(storage: MemStorage, logger: &slog::Logger) -> Raft<MemStorage> {
pub fn bench_raft_new(c: &mut Criterion) {
DEFAULT_RAFT_SETS.... | 3 | 2 | 0 | [{"id": "G0", "claim": "CI still fails because the fixed-size test-case collections at harness/tests/integration_cases/test_raft.rs:452-501 (also 766-781, 1118-1121) remain `vec![]` instead of array literals, leaving `clippy::useless_vec` unresolved and blocking the PR's objective.", "category": "correctness", "verdict... | null |
tikv__tikv__18040 | tikv/tikv | 18,040 | defect | 5c4a575faadb976616813028609550185afb5971 | b1f443b81c13e69e10c1cf53d277613de2c23b85 | raftstore: remove stale ranges by DeleteByKeys rather than ingesting. | <!--
Thank you for contributing to TiKV!
If you haven't already, please read TiKV's [CONTRIBUTING](https://github.com/tikv/tikv/blob/master/CONTRIBUTING.md) document.
If you're unsure about anything, just ask; somebody should be along to answer within a day or two.
PR Title Format:
1. module [, module2, modu... | diff --git a/components/raftstore/src/store/worker/region.rs b/components/raftstore/src/store/worker/region.rs
index 3e7a1e7848f..e7349485c71 100644
--- a/components/raftstore/src/store/worker/region.rs
+++ b/components/raftstore/src/store/worker/region.rs
@@ -487,7 +487,8 @@ where
/// with it.
fn clean_overl... | 1 | 1 | 1 | [{"id": "G0", "claim": "The store should not delete blob files before deleting the kvs in the given ranges — delete_all_in_range should run before delete_ranges_cfs on the blob cf.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
tikv__tikv__18192 | tikv/tikv | 18,192 | defect | 7bc7720aab076898a1049002a0f5216b18e6a58a | 017f3504e253df29be7a324d10bcb89798c70bd6 | importer: add memory limit for importers to avoid OOM | <!--
Thank you for contributing to TiKV!
If you haven't already, please read TiKV's [CONTRIBUTING](https://github.com/tikv/tikv/blob/master/CONTRIBUTING.md) document.
If you're unsure about anything, just ask; somebody should be along to answer within a day or two.
PR Title Format:
1. module [, module2, modu... | diff --git a/src/import/sst_service.rs b/src/import/sst_service.rs
index 7ceeeb6339c..2fe1f9605fc 100644
--- a/src/import/sst_service.rs
+++ b/src/import/sst_service.rs
@@ -39,7 +39,10 @@ use tikv_util::{
config::ReadableSize,
future::{create_stream_with_buffer, paired_future_callback},
resizable_threadp... | 3 | 3 | 1 | [{"id": "G0", "claim": "The upload closure should use check_import_resources()? instead of the manually inlined match, which discards the resource check in the error arm.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "check_import_resources should a... | null |
tikv__tikv__18211 | tikv/tikv | 18,211 | defect | caf82d2864d1501af733bf60c99a7732e105144b | 392d8f5d9f25011f75aa11e4023a36bc5c433b44 | Unsafe Recovery: Fix TiFlash blocks commit idx forwarding in unsafe recovery | <!--
Thank you for contributing to TiKV!
If you haven't already, please read TiKV's [CONTRIBUTING](https://github.com/tikv/tikv/blob/master/CONTRIBUTING.md) document.
If you're unsure about anything, just ask; somebody should be along to answer within a day or two.
PR Title Format:
1. module [, module2, modu... | diff --git a/components/raftstore/src/store/peer.rs b/components/raftstore/src/store/peer.rs
index f6aabc8d56b..43d834dd779 100644
--- a/components/raftstore/src/store/peer.rs
+++ b/components/raftstore/src/store/peer.rs
@@ -2218,13 +2218,16 @@ where
let region = self.region();
let mut replicated_idx ... | 2 | 1 | 1 | [{"id": "G0", "claim": "The new learner-ignoring behaviour in force-leader commit-index forwarding should be covered by a test.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Simply skipping every learner peer is not safe, since in unsafe recovery the f... | null |
tikv__tikv__18495 | tikv/tikv | 18,495 | defect | 41f160e33a083ccff8ce62614099100f016c6817 | 7ed1384bc11c1dfa089d69a216586b4eb8928d0a | Titan: Fix turning off compatibility issue | <!--
Thank you for contributing to TiKV!
If you haven't already, please read TiKV's [CONTRIBUTING](https://github.com/tikv/tikv/blob/master/CONTRIBUTING.md) document.
If you're unsure about anything, just ask; somebody should be along to answer within a day or two.
PR Title Format:
1. module [, module2, modu... | diff --git a/Cargo.lock b/Cargo.lock
index c70f0f1e82f..49adef9094b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3821,7 +3821,7 @@ dependencies = [
[[package]]
name = "librocksdb_sys"
version = "0.1.0"
-source = "git+https://github.com/tikv/rust-rocksdb.git#489433e1cbaba553500c5c9145bf7290f58d9e73"
+source = "git+ht... | 2 | 2 | 1 | [{"id": "G0", "claim": "In BlobRunMode::Fallback, k1 should be rewritten into the LSM instead of getting deleted, so the test's level-5/blob-file expectation comment looks wrong.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The test should send a ... | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.