Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#24894 closed defect (bug) (fixed)

Extend default post lock expiration from 120 to 150 sec.

Reported by: azaozz's profile azaozz Owned by: nacin's profile nacin
Milestone: 3.6 Priority: high
Severity: normal Version: 3.6
Component: Administration Keywords: commit
Focuses: Cc:

Description

In some cases when user A is currently editing a post but takes a break or the browser window is blurred (heartbeat runs on 2 min. interval) and user B opens the same post for editing and waits on the Edit Post screen (the "Post locked" modal is shown, heartbeat runs at 15 sec. interval), user B may take the post lock automatically, without clicking "Take over".

Attachments (2)

24894.patch (1.2 KB) - added by azaozz 11 years ago.
24894.2.patch (409 bytes) - added by azaozz 11 years ago.

Download all attachments as: .zip

Change History (9)

@azaozz
11 years ago

#1 @nacin
11 years ago

Is another option to speed up heartbeat a bit?

#2 follow-up: @azaozz
11 years ago

Yeah, can speed it up to 100 sec. interval instead of 120 sec. when the window is blurred/user is away. This is a "non-fatal false positive". Worst case scenario is user A will get the "Post lock taken over" dialog while user B would still be waiting on the Edit Post screen with "Post is locked" dialog open.

Last edited 11 years ago by azaozz (previous) (diff)

#3 in reply to: ↑ 2 @nacin
11 years ago

Replying to azaozz:

Yeah, can speed it up to 100 sec. interval instead of 120 sec. when the window is blurred/user is away.

That sounds a bit safer and more predictable — changing the brand new API in lieu of changing the existing API.

The post lock is also currently double the autosave interval, which used to be what controlled the post lock extension. Should we decrease heartbeat even further? Or should we increase the expiration further? Or both? A x2 multiplier seems to make sense, but would 100sec and 120sec be okay?

Because we release the lock immediately and have for a few versions now, I don't think a change from 120 to 150 actually affects much, which is good.

#4 @azaozz
11 years ago

Because we release the lock immediately and have for a few versions now, I don't think a change from 120 to 150 actually affects much, which is good.

Was thinking the same. We need the difference between the heartbeat blurred interval and lock expiration to be sufficient for slow connections. 30 or even 20 sec. seems safe enough considering that this is the sum of both user A and user B's connection time.

Last edited 11 years ago by azaozz (previous) (diff)

@azaozz
11 years ago

#5 @markjaquith
11 years ago

  • Keywords commit added

Fine with this.

#6 @nacin
11 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In 24908:

Heartbeat: Reduce the heartbeat from 120 sec to 100 sec when the window doesn't have the focus, to be shorter than the post lock expiration window.

props azaozz.
fixes #24894.

#7 @nacin
11 years ago

In 24909:

Heartbeat: Reduce the heartbeat from 120 sec to 100 sec when the window doesn't have the focus, to be shorter than the post lock expiration window.

Merges [24908] to the 3.6 branch.

props azaozz.
fixes #24894.

Note: See TracTickets for help on using tickets.