-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Corruption: Out-of-order key insertion into table #41242
Comments
Logs provided by @neeral show that the node containing this corrupted sstable was upgraded at:
So the server was shut down at The corruption itself isn't merely out-of-order keys in #37427 fixed a bug with the same out-of-order key symptoms, but the root cause was Windows specific: the cache key for sstable blocks was allowing a block for an old (now deleted) sstable to be retrieved as the block for a new sstable. The nature of this bug made it likely for the corruption to happen for block 0. We no longer have the input sstables for the compaction that generated |
What are the next steps here @petermattis @ajkr ? |
@neeral We're chasing down a lead that perhaps #37427 could be a problem here. What version of Linux are you running. The behavior of |
Even knowing the version of Linux might not be sufficient. Can you run the program below on one of the machines in your cluster and provide the output: package main
import (
"fmt"
"log"
"os"
"syscall"
"golang.org/x/sys/unix"
)
func main() {
if len(os.Args) != 2 {
log.Fatalf("usage: %s <name>", os.Args[0])
}
name := os.Args[1]
for i := 0; i < 10; i++ {
f, err := os.Create(name)
if err != nil {
log.Fatal(err)
}
info, err := f.Stat()
if err != nil {
log.Fatal(err)
}
stat := info.Sys().(*syscall.Stat_t)
const FS_IOC_GETVERSION = 0x80087601
version, err := unix.IoctlGetInt(int(f.Fd()), FS_IOC_GETVERSION)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%d %d\n", stat.Ino, version)
if err := f.Close(); err != nil {
log.Fatal(err)
}
if err := os.Remove(name); err != nil {
log.Fatal(err)
}
}
} |
Linux version: 4.15.0-58 with some patches Output of the program
|
@petermattis any update here? Is this related to #41394 ? |
Nope, this is it - that's the fix for the bug on 2.1, and will go out in the next 2.1 point release. For 2.0, the fix is #41541. Thanks and sorry for not closing the loop! |
Thanks Peter and Bilal. |
Describe the problem
Combination of fatal error messages and warnings.
At first this seemed related to #37427 but that's specific to Windows.
To Reproduce
Observed on a long-running test cluster after upgrading cockroach on that cluster to a version that contained some new commits on 2.1.7.
The new commits included
MVCCScan()
-- Picks up [2.1 backport] table: Always check key ordering when inserting to an SST rocksdb#48 and Lower the risk for users to run options.force_consistency_checks = tr… rocksdb#51.
Environment:
The text was updated successfully, but these errors were encountered: