|
[feature] Locking Support: msg#00940php.drupal.devel
Project: Drupal Version: cvs Component: base system Category: feature requests Priority: normal Assigned to: Anonymous Reported by: Jeremy@xxxxxxxxxxxxxx Updated by: Jeremy@xxxxxxxxxxxxxx Status: patch Attachment: http://drupal.org/files/issues/lock_2.patch (17.8 KB) I attached the wrong patch the second time -- it was unchanged from the first patch. This attached patch includes 'lock.inc' from 'common.inc' instead of 'bootstrap.inc'. Jeremy@xxxxxxxxxxxxxx Previous comments: ------------------------------------------------------------------------ February 23, 2004 - 21:58 : Jeremy@xxxxxxxxxxxxxx Attachment: http://drupal.org/files/issues/lock.patch (17.88 KB) Drupal currently doesn't provide a generic locking mechanism. As Drupal powered websites get more popular, the lack of locking results in increasingly frequent race conditions. This can result in error messages being cached for an indefinate amount of time. Without locking, it is also possible for content to be edited by two people at the same time. Because of this, it is possible to loose important changes. Attached is a patch that introduces 'lock.inc' and a new 'locks' database table allowing for generic locking functions. It also updates node administration to utilize this new locking functionality and present a powerful example of how this new include file can be used. The attached lock.patch: - installs includes/lock.inc - includes lock.inc from includes/bootstrap.inc - adds lock disable/configure functionality to system.module - wraps administration of nodes in access lock, permitting only one user at a time to edit a node o lock is grabbed on first edit o lock is renewed with each preview o lock is freed with submit or delete o lock will timeout (auto-free) after configurable time period - should work with all node types (tested on story, poll and forum). - only locks administrative editing of nodes. To test, use two web browsers to generate two seperate sessions. More information available here [1]. [1] http://cvs.drupal.org/viewcvs/contributions/sandbox/jeremy/4.4.0/locks/ ------------------------------------------------------------------------ February 23, 2004 - 23:42 : weitzman@xxxxxxxxxxxx unless absolutely necessary to serve a cached page, the lock.inc should be included from common.inc, not bootstrap.inc. ------------------------------------------------------------------------ February 24, 2004 - 00:25 : Jeremy@xxxxxxxxxxxxxx Attachment: http://drupal.org/files/issues/lock_0.patch (17.88 KB) Updated attachment to include 'lock.inc' from 'common.inc' instead of 'bootstrap.inc'. I can see locking being used to create a cached page, but not when actually serving the cached page... -- View: http://drupal.org/node/view/6025 Edit: http://drupal.org/project/comments/add/6025 |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [feature] Locking Support: 00940, Gerhard Killesreiter |
|---|---|
| Next by Date: | [bug] Multiple node types with a dash (and not a slash): 00940, JonBob |
| Previous by Thread: | [feature] Locking Supporti: 00940, Jeremy |
| Next by Thread: | Re: [feature] Locking Support: 00940, Gerhard Killesreiter |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |