-
Notifications
You must be signed in to change notification settings - Fork 8
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
[DMS-277] DB schema changes for delete performance #197
Conversation
Test Results428 tests - 3 390 ✅ - 12 1m 48s ⏱️ -32s Results for commit 950bc88. ± Comparison against base commit 971b577. This pull request removes 5 and adds 2 tests. Note that renamed tests count towards both.
This pull request skips 9 tests.
♻️ This comment has been updated with latest results. |
@@ -122,6 +122,7 @@ public void It_should_be_a_successful_delete_for_1st_transaction() | |||
} | |||
|
|||
[Test] | |||
[Ignore("DMS-296 will resolve intermittent serialization failures causing UnknownFailure")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See DMS-296, but ran into this several times. Not sure why.
@@ -235,76 +236,63 @@ public async Task It_should_be_the_1st_update_found_by_get() | |||
} | |||
|
|||
[TestFixture] | |||
public class Given_an_update_of_a_document_that_references_a_non_existent_document : UpdateTests | |||
public class Given_an_update_of_a_document_to_reference_a_non_existent_document : UpdateTests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test was not testing the right thing
[Test] | ||
public void It_should_be_a_update_failure_reference() | ||
{ | ||
_updateResult.Should().BeOfType<UpdateResult.UpdateFailureImmutableIdentity>(); | ||
_updateResult.Should().BeOfType<UpdateResult.UpdateFailureReference>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test was not testing the right thing
|
||
// given an update of a document that references a nonexisting descriptor | ||
// given an update of a document that tries to reference an existing descriptor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to make scenario more clear
@@ -13,130 +13,18 @@ | |||
|
|||
namespace EdFi.DataManagementService.Backend.Postgresql.Operation; | |||
|
|||
/// <summary> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This unnecessary duplication was getting to be too much.
@@ -177,6 +65,7 @@ LockOption lockOption | |||
} | |||
}; | |||
|
|||
await command.PrepareAsync(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All SQL now cached by PostgreSQL as prepared statements
FROM unnest($1, $2, $3, $4) AS | ||
ids(documentId, documentPartitionKey, referentialId, referentialPartitionKey) | ||
LEFT JOIN dms.Alias a ON | ||
ids.referentialId = a.referentialId and ids.referentialPartitionKey = a.referentialPartitionKey", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inserts into references table now requires a join to get documentId of reference.
INNER JOIN dms.Document d2 ON d2.Id = r.ReferencedDocumentId | ||
AND d2.DocumentPartitionKey = r.ReferencedDocumentPartitionKey | ||
WHERE d2.DocumentUuid = $1 AND d2.DocumentPartitionKey = $2) AS re | ||
ON re.ParentDocumentId = d.id AND re.ParentDocumentPartitionKey = d.DocumentPartitionKey |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One less join now to get post-delete failure info. All joins are also now on indexes.
### Note, no descriptor validation yet | ||
|
||
### Setup - POST School Year 2025 | ||
POST http://localhost:{{port}}/data/ed-fi/schoolYearTypes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Friday's demo, because why not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be great for the Project Tanager workgroup meeting on Thursday.
No description provided.