Skip to content
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

Implement dropIndexes command #2313

Merged
merged 40 commits into from
Mar 31, 2023
Merged
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
11d097d
initial
chilagrow Mar 29, 2023
c5ef8a8
wip
chilagrow Mar 29, 2023
1d6142f
wip
chilagrow Mar 29, 2023
45f0fc8
merge conflict
rumyantseva Mar 29, 2023
9f46c76
wip
rumyantseva Mar 29, 2023
03292db
Merge branch 'main' into 1512-drop-index
Mar 29, 2023
3a24354
wip
rumyantseva Mar 29, 2023
31c04e2
wip
rumyantseva Mar 29, 2023
eb83da8
more error testcases
chilagrow Mar 30, 2023
370e416
test
chilagrow Mar 30, 2023
3dd2289
update
chilagrow Mar 30, 2023
383dba2
add stress test, lint
chilagrow Mar 30, 2023
4e1eb52
merge
chilagrow Mar 30, 2023
347a791
wip
chilagrow Mar 30, 2023
76d1326
wip
rumyantseva Mar 30, 2023
76a8244
wip
rumyantseva Mar 30, 2023
de06ef8
fix test
chilagrow Mar 30, 2023
ede2daa
fmt
chilagrow Mar 30, 2023
a94d6ee
wip
rumyantseva Mar 30, 2023
efaa50a
wip
rumyantseva Mar 30, 2023
7e0eda8
wip
rumyantseva Mar 30, 2023
4e49100
Merge branch 'main' into 1512-drop-index
rumyantseva Mar 30, 2023
537ec0e
wip
rumyantseva Mar 30, 2023
384ca60
wip
rumyantseva Mar 30, 2023
01de15d
wip
rumyantseva Mar 30, 2023
d654dd4
more tests
rumyantseva Mar 30, 2023
e6f2c18
wip
rumyantseva Mar 30, 2023
1211342
Reveal problems with cursors
rumyantseva Mar 30, 2023
42991f7
wip
rumyantseva Mar 30, 2023
ff07b7d
wip
rumyantseva Mar 30, 2023
47ca25e
wip
rumyantseva Mar 30, 2023
318f881
Merge branch 'main' into 1512-drop-index
Mar 30, 2023
85adee7
rename consistently
chilagrow Mar 31, 2023
3c318c6
fix race
chilagrow Mar 31, 2023
70c53ff
increase test coverage
chilagrow Mar 31, 2023
37ffd64
comments, lint, name
chilagrow Mar 31, 2023
373638e
removed unused code
chilagrow Mar 31, 2023
a38f627
comment
chilagrow Mar 31, 2023
7dd10d6
Merge branch 'main' into 1512-drop-index
Mar 31, 2023
7e7971e
Merge branch 'main' into 1512-drop-index
AlekSi Mar 31, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix race
  • Loading branch information
chilagrow committed Mar 31, 2023
commit 3c318c6745b68b512ce2b0d939a4349c6755f752
12 changes: 7 additions & 5 deletions internal/handlers/pg/pgdb/indexes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,18 +323,20 @@ func TestDropIndexesStress(t *testing.T) {

<-start

err = pool.InTransaction(ctx, func(tx pgx.Tx) error {
// do not use `err`, to avoid data race
tErr := pool.InTransaction(ctx, func(tx pgx.Tx) error {
idx := Index{
Name: indexName,
Key: indexKeys,
}

_, err = DropIndex(ctx, tx, databaseName, collectionName, &idx)
return err
// do not use `err`, to avoid data race
_, dropErr := DropIndex(ctx, tx, databaseName, collectionName, &idx)
return dropErr
})
// if the index could not be dropped, the error is checked
if err != nil {
require.Error(t, err, ErrIndexNotExist)
if tErr != nil {
require.Error(t, tErr, ErrIndexNotExist)
}
}()
}
Expand Down