-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
sql : sequence value out of bounds #74127
Comments
Hello, I am Blathers. I am here to help you get the issue triaged. It looks like you have not filled out the issue in the format of any of our templates. To best assist you, we advise you to use one of these templates. I was unable to automatically find someone to ping. If we have not gotten back to your issue within a few business days, you can try the following:
🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
Why is there an extra illegal value, is this a special design?
|
Previously, an additional out-of-range sequence value may have been generated. The original criterion was whether the previous endSequence value exceeded the limit. However, when the current endSequence is 1, the increment is 2 and the MaxValue is 2, the previous endSequence value is 1 and the program does not report an error. However, when the current endSequenceValue 3 exceeds the limit, an error should be reported In incrementSequenceUsingCache, the criterion for determining whether a cache's data is eligible is modified to whether the first data that may be stored in the cache exceeds the limit. Fixes cockroachdb#74127. Release note: None
Thanks for this bug report! No this isn't desired behavior. I believe the problem might be the same as #52552 (comment) |
Oh, thank you! I am also confused with this question. |
But I have a feeling that this issue is a separate bug, a boundary judgement issue |
Previously, an additional out-of-range sequence value may have been generated. The original criterion was whether the previous endSequence value exceeded the limit. However, when the current endSequence is 1, the increment is 2 and the MaxValue is 2, the previous endSequence value is 1 and the program does not report an error. However, when the current endSequenceValue 3 exceeds the limit, an error should be reported In incrementSequenceUsingCache, the criterion for determining whether a cache's data is eligible is modified to whether the first data that may be stored in the cache exceeds the limit. Fixes cockroachdb#74127. Release note: None
Previously, an additional out-of-range sequence value may have been generated. The original criterion was whether the previous endSequence value exceeded the limit. However, when the current endSequence is 1, the increment is 2 and the MaxValue is 2, the previous endSequence value is 1 and the program does not report an error. However, when the current endSequenceValue 3 exceeds the limit, an error should be reported In incrementSequenceUsingCache, the criterion for determining whether a cache's data is eligible is modified to whether the first data that may be stored in the cache exceeds the limit. Fixes cockroachdb#74127. Release note: None
Previously, an additional out-of-range sequence value may have been generated. The original criterion was whether the previous endSequence value exceeded the limit. However, when the current endSequence is 1, the increment is 2 and the MaxValue is 2, the previous endSequence value is 1 and the program does not report an error. However, when the current endSequenceValue 3 exceeds the limit, an error should be reported In incrementSequenceUsingCache, the criterion for determining whether a cache's data is eligible is modified to whether the first data that may be stored in the cache exceeds the limit. Fixes cockroachdb#74127. Release note: None
Previously, an additional out-of-range sequence value may have been generated. The original criterion was whether the previous endSequence value exceeded the limit. However, when the current endSequence is 1, the increment is 2 and the MaxValue is 2, the previous endSequence value is 1 and the program does not report an error. However, when the current endSequenceValue 3 exceeds the limit, an error should be reported In incrementSequenceUsingCache, the criterion for determining whether a cache's data is eligible is modified to whether the first data that may be stored in the cache exceeds the limit. Fixes cockroachdb#74127. Release note: None
…' were not as expected If the sequenceVal exceeded the old MinValue or MaxValue, we must set sequenceVal to the last valid one. 1. Values is just init, when the sequence is altered before it has ever been used. In this case, last valid sequenceVal is oldStart. Set the initial value to the oldStartValue(just like pg), when last valid sequenceVal in [newMinValue, newMaxValue]. 2. When the sequenceVal out of range result from increment, report an error. Fixed cockroachdb#52552 cockroachdb#74127 Release note (bug fix): A bug with ALTER SEQUENCE that allowed a sequence to return values that are out-of-range has been fixed.
…' were not as expected If the sequenceVal exceeded the old MinValue or MaxValue, we must set sequenceVal to the last valid one. 1. Values is just init, when the sequence is altered before it has ever been used. In this case, last valid sequenceVal is oldStart. Set the initial value to the oldStartValue(just like pg), when last valid sequenceVal in [newMinValue, newMaxValue]. 2. When the sequenceVal out of range result from increment, report an error. Fixed cockroachdb#52552 cockroachdb#74127 Release note (bug fix): A bug with ALTER SEQUENCE that allowed a sequence to return values that are out-of-range has been fixed.
…' were not as expected If the sequenceVal exceeded the old MinValue or MaxValue, we must set sequenceVal to the last valid one. 1. Values is just init, when the sequence is altered before it has ever been used. In this case, last valid sequenceVal is oldStart. Set the initial value to the oldStartValue(just like pg), when last valid sequenceVal in [newMinValue, newMaxValue]. 2. When the sequenceVal out of range result from increment, report an error. Fixed cockroachdb#52552 cockroachdb#74127 Release note (bug fix): A bug with ALTER SEQUENCE that allowed a sequence to return values that are out-of-range has been fixed.
…' were not as expected If the sequenceVal exceeded the old MinValue or MaxValue, we must set sequenceVal to the last valid one. 1. Values is just init, when the sequence is altered before it has ever been used. In this case, last valid sequenceVal is oldStart. Set the initial value to the oldStartValue(just like pg), when last valid sequenceVal in [newMinValue, newMaxValue]. 2. When the sequenceVal out of range result from increment, report an error. Fixed cockroachdb#52552 cockroachdb#74127 Release note (bug fix): A bug with ALTER SEQUENCE that allowed a sequence to return values that are out-of-range has been fixed.
…' were not as expected If the sequenceVal exceeded the old MinValue or MaxValue, we must set sequenceVal to the last valid one. 1. Values is just init, when the sequence is altered before it has ever been used. In this case, last valid sequenceVal is oldStart. Set the initial value to the oldStartValue(just like pg), when last valid sequenceVal in [newMinValue, newMaxValue]. 2. When the sequenceVal out of range result from increment, report an error. Fixed cockroachdb#52552 cockroachdb#74127 Release note (bug fix): A bug with ALTER SEQUENCE that allowed a sequence to return values that are out-of-range has been fixed.
…' were not as expected If the sequenceVal exceeded the old MinValue or MaxValue, we must set sequenceVal to the last valid one. 1. Values is just init, when the sequence is altered before it has ever been used. In this case, last valid sequenceVal is oldStart. Set the initial value to the oldStartValue(just like pg), when last valid sequenceVal in [newMinValue, newMaxValue]. 2. When the sequenceVal out of range result from increment, report an error. Fixed cockroachdb#52552 cockroachdb#74127 Release note (bug fix): A bug with ALTER SEQUENCE that allowed a sequence to return values that are out-of-range has been fixed.
Previously, an additional out-of-range sequence value may have been generated. The original criterion was whether the previous endSequence value exceeded the limit. However, when the current endSequence is 1, the increment is 2 and the MaxValue is 2, the previous endSequence value is 1 and the program does not report an error. However, when the current endSequenceValue 3 exceeds the limit, an error should be reported In incrementSequenceUsingCache, the criterion for determining whether a cache's data is eligible is modified to whether the first data that may be stored in the cache exceeds the limit. Fixes cockroachdb#74127.
81108: *: improve inline code comments r=maryliag a=Azhng Release note: None 81123: sql : sequence value out of bounds r=rafiss a=mosquito2333 Previously, an additional out-of-range sequence value may have been generated. The original criterion was whether the previous endSequence value exceeded the limit. However, when the current endSequence is 1, the increment is 2 and the MaxValue is 2, the previous endSequence value is 1 and the program does not report an error. However, when the current endSequenceValue 3 exceeds the limit, an error should be reported In incrementSequenceUsingCache, the criterion for determining whether a cache's data is eligible is modified to whether the first data that may be stored in the cache exceeds the limit. Fixes #74127. Release note (bug fix): Fixed a bug where sequences could return values that are out-of-bounds in some cases. 81213: ui, changefeeds: better status col in db console r=abarganier,HonoreDB a=dhartunian Previously, when a job contained a `highwater_timestamp` column value (present for changefeeds) the status column in DB console would *always* show that value instead of the job status ("running", "paused", etc.). This would cause confusion for operators because the SQL output for job status always included both a `status` column and a separate `highwater_timestamp` column. This change moves the `highwater_timestamp` into a separate column and always renders the `status` column with the "pill" component that shows the current job status. The highwater timestamp is also moved to the sidebar in the job details page instead of replacing the status pill, for similar consistency. Finally, the highwater timestamp now displays the nanosecond decimal value by default and the human-readable formatted value in the tooltip. This faciliates easier copy/paste behavior from the UI as the decimal is more useful. ![Screenshot 2022-05-12 at 16-09-19 Jobs Cockroach Console](https://user-images.githubusercontent.com/986307/168162734-48a61ec4-c5a5-41e2-9533-845afe08a0b4.png) ![Screenshot 2022-05-12 at 16-09-47 Details Job Cockroach Console](https://user-images.githubusercontent.com/986307/168162742-ee3e3f4c-136e-424f-af54-cf03fde42406.png) Resolves #80496 Release note (ui change): The job status page in the DB Console will now show the status column for changefeed jobs and display the `highwater_timestamp` value in a separate column. Thise more closely matches the SQL output of `SHOW changefeed JOBS`. The highwater timestamp now displays as the nanosecond system time value by default with the human-readable value in the tooltip since the decimal value is copy/pasted more often. Co-authored-by: Azhng <[email protected]> Co-authored-by: mosquito2333 <[email protected]> Co-authored-by: David Hartunian <[email protected]>
When I used the sequence , I found that the value of the sequence was out of bounds using the following statement, but it did not report an error.
version:cockroach-v21.1.7.linux-amd64
Jira issue: CRDB-11928
Epic CRDB-14049
The text was updated successfully, but these errors were encountered: