File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change 1111//!
1212//! In general, multiple pushes happening quickly should be rare. And when it
1313//! does happen, hopefully the state in the database will prevent duplicate
14- //! messages. However, the database check itself is racey without a lock (see
15- //! `maybe_add_comment`).
14+ //! messages.
1615
1716use crate :: {
1817 config:: MergeConflictConfig ,
@@ -262,11 +261,6 @@ async fn maybe_add_comment(
262261 issue : & Issue ,
263262 possibly : Option < & str > ,
264263) -> anyhow:: Result < ( ) > {
265- // Note: This database access is racey. Preferably there would be a
266- // row-lock held between the time it is loaded and the save call below.
267- // The `post_comment` call should normally be pretty fast, so races should
268- // be rare. If they happen too often, consider adding some locking
269- // mechanism here.
270264 let mut state: IssueData < ' _ , MergeConflictState > =
271265 IssueData :: load ( db, issue, MERGE_CONFLICT_KEY ) . await ?;
272266 if state. data . last_warned_comment . is_some ( ) {
You can’t perform that action at this time.
0 commit comments