This repository was archived by the owner on Sep 27, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,12 @@ class Updater {
76
76
TargetList *target_list_;
77
77
78
78
// Write set for tracking newly created tuples inserted by the same statement
79
+ // This statement-level write set is essential for avoiding the Halloween Problem,
80
+ // which refers to the phenomenon that an update operation causes a change to
81
+ // a tuple, potentially allowing this tuple to be visited more than once during
82
+ // the same operation.
83
+ // By maintaining the statement-level write set, an update operation will check
84
+ // whether the to-be-updated tuple is created by the same operation.
79
85
ReadWriteSet *statement_write_set_;
80
86
81
87
// Ownership information
Original file line number Diff line number Diff line change @@ -54,6 +54,12 @@ class UpdateExecutor : public AbstractExecutor {
54
54
const planner::ProjectInfo *project_info_ = nullptr ;
55
55
56
56
// Write set for tracking newly created tuples inserted by the same statement
57
+ // This statement-level write set is essential for avoiding the Halloween Problem,
58
+ // which refers to the phenomenon that an update operation causes a change to
59
+ // a tuple, potentially allowing this tuple to be visited more than once during
60
+ // the same operation.
61
+ // By maintaining the statement-level write set, an update operation will check
62
+ // whether the to-be-updated tuple is created by the same operation.
57
63
ReadWriteSet statement_write_set_;
58
64
};
59
65
You can’t perform that action at this time.
0 commit comments