File tree 1 file changed +1
-7
lines changed 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change 11
11
//!
12
12
//! In general, multiple pushes happening quickly should be rare. And when it
13
13
//! 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.
16
15
17
16
use crate :: {
18
17
config:: MergeConflictConfig ,
@@ -262,11 +261,6 @@ async fn maybe_add_comment(
262
261
issue : & Issue ,
263
262
possibly : Option < & str > ,
264
263
) -> 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.
270
264
let mut state: IssueData < ' _ , MergeConflictState > =
271
265
IssueData :: load ( db, issue, MERGE_CONFLICT_KEY ) . await ?;
272
266
if state. data . last_warned_comment . is_some ( ) {
You can’t perform that action at this time.
0 commit comments