(Bugfix!) Adjust date condition for data partitioning process#10302
(Bugfix!) Adjust date condition for data partitioning process#10302ThisUsernameWasNotTaken wants to merge 1 commit intoMicrosoftDocs:livefrom
Conversation
After trying the example i had to change this condition because the logical partitioning system of the sql server will sort rows into their partition this way too internally. It became obvious after spamming inserts and split commands with identical time values since the precision of datetime2 required by this example project is ambiguous for rapidly retrieved SYSDATETIME() values. Regardless of transaction safety. If too fast its gets ambiguous. ie. two identical values for two seperate calls to SYSDATETIME().
|
@ThisUsernameWasNotTaken : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change. |
|
Learn Build status updates of commit 71994f8: ✅ Validation status: passed
For more details, please refer to the build report. |
There was a problem hiding this comment.
Pull request overview
Updates the T-SQL sample in the In-Memory OLTP partitioning pattern article to adjust the boundary condition used when offloading rows and when creating the staging table’s CHECK constraint, aiming to avoid issues with identical datetime2 boundary values during rapid SYSDATETIME() usage.
Changes:
- Change offload predicates from
<= @splitdateto< @splitdatefor both the INSERT and DELETE. - Change the staging CHECK constraint from
so_date > @splitdatetoso_date >= @splitdate. - Add an inline NOTE describing potential partition boundary duplication errors.
|
Can you review the proposed changes? Important: When the changes are ready for publication, adding a #label:"aq-pr-triaged" |
|
#sign-off |
|
Invalid command: '#sign-off'. Only the assigned author of one or more file in this PR can sign off. @MikeRayMSFT |
|
Hi @ThisUsernameWasNotTaken - Thanks for your review. In the public repo, pull requests should be signed off by the author, another member of the content team, or a PM. @MikeRayMSFT Could you take a look? Thanks! |
|
In review. #reassign:rwestMSFT |
|
@ThisUsernameWasNotTaken Thank you for your contribution. I've reviewed the proposed changes to the code. The inline NOTE comment doesn't meet our editorial guidelines, and the article is due for a freshness pass, so we will incorporate your changes into an internal PR. When the internal PR is merged, this public PR will automatically close. It can take one or two business days after that to see the updated article. You will be recorded as a contributor. |
|
Sounds great, thanks for the update! Glad I could help improve the docs. |
After trying the example i had to change this condition because the logical partitioning system of the sql server will sort rows into their partition this way too internally. It became obvious after spamming inserts and split commands with identical time values since the precision of datetime2 required by this example project is ambiguous for rapidly retrieved SYSDATETIME() values. Regardless of transaction safety. If too fast its gets ambiguous. ie. two identical values for two seperate calls to SYSDATETIME().