Repository navigation
Conversation
Each check compiles single-partition, multi-partition and compound procedure classes in SQLancer's JVM against the kit's jars (--procedure-classpath, which run-sqlancer.sh sets), loads them with @UpdateClasses and creates the procedures FROM CLASS. Calls must return and leave exactly their rows, roll back whole when they fail (abort, exception, expectation, constraint), and a call a node failure interrupts must have committed whole or not at all. Compound procedures are checked per JPS call, for every completion path, abort, failure, nested call, too many calls and dropped calls. Then classes are replaced, or VoltDB must refuse removing a class in use, a class whose initializer throws, the wrong kind of class, or a bad partition parameter. The classes also go to the mirror and the XDCR peer. run-coverage.sh runs it.
… known bugs JAVAPROC's local trials, lab build sqlancer#64's kill run and run-coverage.sh's kill run. ENG-30708: a resize run's elastic join whose index snapshot failed, after which a truncation snapshot crashed every node; not reduced, no workaround.
The project's formatter, the import grouping checkstyle wants, and the names PMD wants (singlePartition, multiPartition; no reassigned parameter). No change in behavior.
…e 50) Lab build sqlancer#64's security run failed: a user LOGIN removed with @SetYamlConfiguration still logged in. A user change that races an @UpdateClasses reaches the deployment but not the catalog (ENG-30710, 16.0.0 too). repros/ENG-30710.sh reproduces it at the first user, and not without the @UpdateClasses loop (CONTROL=1). While avoiding known bugs, JAVAPROC's @UpdateClasses calls hold the lock LOGIN and CONFIG share.
…e 50) Lab build sqlancer#65's security run failed in TASK: a task ON ERROR STOP stopped showed RUNNING again. @UpdateClasses restarts every task, the stopped one included, which runs its procedure again (ENG-30711, 16.0.0 too); an ordinary DDL change does not. repros/ENG-30711.sh reproduces it. While avoiding known bugs, TASK's checks hold a read lock and JAVAPROC's @UpdateClasses calls the write lock. Locally, TASK beside JAVAPROC fails twice in 5 minutes without the lock and passes with it.
Author
|
Superseded by #51, which combines every ENG-30396 PR of this repo into one. This PR's branch is kept, and its description still has this milestone's details and lab results. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Every procedure the other oracles create is one SQL statement in DDL. So milestone 49's coverage found the rest of VoltDB's procedure support never run:
CompoundProcedureRunner0 of 183 lines,VoltCompoundProcedure0 of 35;@UpdateClassesand its checks:UpdateClassesAcceptancePolicy2 of 23;ProcedureCompiler108 of 477,CreateProcedureFromClass5 of 39;ProcedureRunnerImpl.What it changes
VoltDBJavaProcedureOracle). Each check writes the Java source of a single-partition, a multi-partition, a compound and a non-transactional procedure class, compiles them in SQLancer's JVM against the kit's jars, loads them with@UpdateClassesand creates the proceduresFROM CLASS. Then:--procedure-classpath, whichrun-sqlancer.shsets to the kit's procedure API, server and client jars. The classes also go to the mirror and the XDCR peer, where the provider repeats the DDL.run-coverage.shruns JAVAPROC in every run, and the summary has a JAVAPROC line.repros/ENG-30710.sh(withrepros/users/RemovedUserRepro.java) andrepros/ENG-30711.sh.On the job side (VoltDB/pro#7150, VoltDB/internal#6474), JAVAPROC joins the default oracles, and the Jenkinsfile pins this branch's head.
Bugs found
@SetYamlConfigurationstill logs in when an@UpdateClassesruns at the same time.@GetYamlConfigurationno longer lists the user, but the update applies with the catalog unchanged (securityChange=false). Found by LOGIN beside JAVAPROC in lab build sqlancer#64's security run. 16.0.0 too.repros/ENG-30710.shreproduces it at the first user, and not without the@UpdateClassesloop.@UpdateClassescalls hold the lock LOGIN and CONFIG share.@UpdateClassesrestarts a task thatON ERROR STOPstopped: it shows RUNNING and runs its procedure again. An ordinary DDL change does not. Found by TASK beside JAVAPROC in lab build sqlancer#65's security run. 16.0.0 too.repros/ENG-30711.sh.@UpdateClassescalls exclude each other (a read-write lock).run-coverage.sh's resize run; not reduced.The resize rerun under coverage also turned up a restore that, right after a shrink, left out rows that collide with nothing. It is not reproduced alone yet and not filed.
Coverage (
run-coverage.sh's 10-minute kill run, against the best of milestones 44 to 49)CompoundProcedureRunnerVoltCompoundProcedureProcedureCompilerUpdateApplicationBaseNTProcedureServiceClassMatcherCreateProcedureFromClassUpdateClassesAcceptancePolicyInMemoryJarfileIn all, 813 lines more in 38 classes.
Testing
mvn verify -DskipTestspasses.ENG-30396-sqlancer-nightlyofmatrix-systemtest-apprunner-sqlancer, replays against 16.1.0-SNAPSHOT (master kit 400), all thirty-three oracles:3:1:300): passed, 213 JAVAPROC checks and 833 calls (362 single-partition, 240 multi-partition, 231 compound), 346 failures checked;3:1:u, from 16.0.0 in service, 3 of 3 nodes upgraded): passed, 243 checks and 970 calls;1:0:sec): failed, three removed users logged in. That is ENG-30710, now avoided.--avoid-known-bugs falseand passes without it. LOGIN beside JAVAPROC for 5 minutes, with the same seed, failed 3 databases before the ENG-30710 workaround and passed after it.