perf(deps): scan one cycle table for same-storage edges (#4004)
* perf(deps): narrow recursive cycle checks * fix(deps): keep mixed-table cycle detection * fix(deps): preserve mixed-table wisp cycle scans
This commit is contained in:
parent
376a24ad17
commit
a4ebe8ffec
2 changed files with 9 additions and 2 deletions
|
|
@ -113,6 +113,12 @@ func setupTestStore(t *testing.T) (*DoltStore, func()) {
|
|||
|
||||
// Create an isolated branch for this test
|
||||
_, branchCleanup := testutil.StartTestBranch(t, store.db, testSharedDB)
|
||||
if err := initSchemaOnDB(ctx, store.db); err != nil {
|
||||
branchCleanup()
|
||||
store.Close()
|
||||
os.RemoveAll(tmpDir)
|
||||
t.Fatalf("failed to initialize branch-local ignored schema: %v", err)
|
||||
}
|
||||
|
||||
cleanup := func() {
|
||||
branchCleanup()
|
||||
|
|
|
|||
|
|
@ -54,8 +54,9 @@ type AddDependencyOpts struct {
|
|||
// WriteTable is the dependency table to insert/update/check existing deps in.
|
||||
// Auto-detected from source wisp routing if empty.
|
||||
WriteTable string
|
||||
// DepTables are the tables to scan for cycle detection. The recursive CTE
|
||||
// UNIONs all of them. Defaults to ["dependencies", "wisp_dependencies"] if empty.
|
||||
// DepTables are the tables to scan for cycle detection. Defaults to both
|
||||
// dependency tables; edge storage is source-routed, so same-class endpoints
|
||||
// can still have mixed-table interior paths.
|
||||
DepTables []string
|
||||
// IsCrossPrefix is true when source and target have different prefixes,
|
||||
// meaning the target lives in another rig's database.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue