You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@horaedb.apache.org by "chunshao90 (via GitHub)" <gi...@apache.org> on 2024/08/02 03:22:52 UTC
[PR] fix: sequence overflow when dropping a table using a message queue as WAL [horaedb]
chunshao90 opened a new pull request, #1550:
URL: https://github.com/apache/horaedb/pull/1550
## Rationale
Fix the issue of sequence overflow when dropping a table using a message queue as WAL.
close #1543
## Detailed Changes
Check the maximum value of sequence to prevent overflow.
## Test Plan
CI.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@horaedb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@horaedb.apache.org
For additional commands, e-mail: commits-help@horaedb.apache.org
Re: [PR] fix: sequence overflow when dropping a table using a message queue as WAL [horaedb]
Posted by "Rachelint (via GitHub)" <gi...@apache.org>.
Rachelint commented on code in PR #1550:
URL: https://github.com/apache/horaedb/pull/1550#discussion_r1701419511
##########
src/wal/src/message_queue_impl/wal.rs:
##########
@@ -70,8 +70,13 @@ impl<M: MessageQueue> WalManager for MessageQueueImpl<M> {
location: WalLocation,
sequence_num: SequenceNumber,
) -> Result<()> {
+ let delete_to_sequence_num = if sequence_num == MAX_SEQUENCE_NUMBER {
+ MAX_SEQUENCE_NUMBER
+ } else {
+ sequence_num + 1
+ };
Review Comment:
```
if sequence_num < MAX_SEQUENCE_NUMBER {
sequence_num + 1
} else {
MAX_SEQUENCE_NUMBER
}
```
We should place the hot branch first.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@horaedb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@horaedb.apache.org
For additional commands, e-mail: commits-help@horaedb.apache.org
Re: [PR] fix: sequence overflow when dropping a table using a message queue as WAL [horaedb]
Posted by "Rachelint (via GitHub)" <gi...@apache.org>.
Rachelint commented on code in PR #1550:
URL: https://github.com/apache/horaedb/pull/1550#discussion_r1701419511
##########
src/wal/src/message_queue_impl/wal.rs:
##########
@@ -70,8 +70,13 @@ impl<M: MessageQueue> WalManager for MessageQueueImpl<M> {
location: WalLocation,
sequence_num: SequenceNumber,
) -> Result<()> {
+ let delete_to_sequence_num = if sequence_num == MAX_SEQUENCE_NUMBER {
+ MAX_SEQUENCE_NUMBER
+ } else {
+ sequence_num + 1
+ };
Review Comment:
```
if sequence_num < MAX_SEQUENCE_NUMBER {
sequence_num + 1
} else {
MAX_SEQUENCE_NUMBER
}
```
More friendly for branch predict.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@horaedb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@horaedb.apache.org
For additional commands, e-mail: commits-help@horaedb.apache.org
Re: [PR] fix: sequence overflow when dropping a table using a message queue as WAL [horaedb]
Posted by "chunshao90 (via GitHub)" <gi...@apache.org>.
chunshao90 merged PR #1550:
URL: https://github.com/apache/horaedb/pull/1550
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@horaedb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@horaedb.apache.org
For additional commands, e-mail: commits-help@horaedb.apache.org