Open
Conversation
Contributor
|
感觉这样实现的主要问题是,需要对 我想的解决方法是,在原先的代码框架下,不在 PR 中的代码可能有一些潜在的问题:
|
Member
|
魏来同学的解决方案是将并发冲突的判断逻辑从 MvccTrx::visit_record 中移除,并推迟到实际调用 delete_record 时再进行判断。这种方式确实更符合逻辑,删除操作只有在执行时才需要判断并发冲突。这样不仅减少了侵入式修改,同时也更符合事务的实际执行流程。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修复了问题#25, 即lab5文档中的sql测试完成后,能删除id=0以外的数据了(如图1),删除id=0或delete from t_redo(删除全部数据,如图2)依然会触发写写冲突(因为transaction4的事务没有提交导致的)