What can I do to prevent write-write conflicts on a wiki-style website?

后端 未结 8 1646
借酒劲吻你
借酒劲吻你 2021-02-03 12:44

On a wiki-style website, what can I do to prevent or mitigate write-write conflicts while still allowing the site to run quickly and keeping the site easy to use?

The pr

8条回答
  •  滥情空心
    2021-02-03 13:17

    At my office, we have a policy that all data tables contain 4 fields:

    • CreatedBy
    • CreatedDate
    • LastUpdateBy
    • LastUpdateDate

    That way there is a nice audit trail on who has done what to the records, at least most recently.

    But most importantly, it becomes easy enough to compare the LastUpdateDate of the current or edited record on the screen (requires you to store it on the page, in a cookie, whatever, with the value in the database. If the values don't match, you can decide what to do from there.

提交回复
热议问题