This repository has been archived by the owner on Sep 27, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 623
Read-Only TxnContext Interface; Read-Only (single-statement select, txn) optimizations #1402
Open
lmwnshn
wants to merge
19
commits into
cmu-db:master
Choose a base branch
from
lmwnshn:txnctx/readonly
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 17 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
50411cb
formatting
lmwnshn e506f17
remove default read_only for transactions (#1396:1-3)
lmwnshn e0a9348
formatting
lmwnshn 8b1531b
treat txn w/ no modifying queries as read-only (#1396:4)
lmwnshn 467834c
mark single-statement select txn read-only (#1395)
lmwnshn b2612aa
formatting
lmwnshn 3395f6c
reorder non-default parameters in TransactionThread::ExecuteNext
lmwnshn 5711dc2
Merge branch 'master' into txnctx/readonly
apavlo 6787337
add LOG_TRACE when ending transaction early
lmwnshn bd5ac57
set statement in copy_test
lmwnshn 9adeccb
Merge branch 'master' into txnctx/readonly
tli2 2c7cf9e
Merge branch 'master' of https://github.com/cmu-db/peloton into txnct…
lmwnshn 9f8acef
Use is_written_ flag instead of rwset in commit
lmwnshn c8e14f6
Merge branch 'master' into txnctx/readonly
apavlo 0fa4b3d
Merge branch 'master' into txnctx/readonly
apavlo 9b29a4c
Merge branch 'master' of https://github.com/cmu-db/peloton into txnct…
lmwnshn 5739f18
undo formatting changes
lmwnshn 61fd663
move early txn ending to after GC
lmwnshn ec4c796
undo marking read-only until we can test it (#1395)
lmwnshn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -590,6 +590,12 @@ ResultType TimestampOrderingTransactionManager::CommitTransaction( | |
//// handle other isolation levels | ||
////////////////////////////////////////////////////////// | ||
|
||
if (!current_txn->IsWritten()) { | ||
LOG_TRACE("Transaction not yet written, ending transaction."); | ||
EndTransaction(current_txn); | ||
return ResultType::SUCCESS; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What happens if the transaction just drops an object, like an index? |
||
|
||
auto storage_manager = storage::StorageManager::GetInstance(); | ||
auto &log_manager = logging::LogManager::GetInstance(); | ||
|
||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
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.
I would just add a
LOG_TRACE
statement here to record what is happening.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.
Added