Gelbooru

Notice: We are now selling NEW Gelbooru Merch~! Domestic shipping is free on all orders! Do you have an artist tag on Gelbooru? Let us know so we can properly credit you!

Ticket Information - ID: #547


ID:Category:SeverityReproducibilityDate SubmittedUpdated By:
0000547Feature RequestnormalN/A08/19/11 04:05PMlozertuser
ReporterJerl
Assigned to:geltas
Resolution:Open
View StatusPublic
Version:
Target Version:N/A
Summary:Warning when tags you are editing have changed since you loaded the page
Description:To prevent tag edit collisions, there should be some sort of warning when you press "Save changes" while editing tags if someone else has edited the tags between the time when you loaded the page and the time you edited the tag. Tag edit collisions can cause legitimate tag edits to be overwritten, and it's unlikely that either party would notice that the collision happened.

Just a bit of JavaScript added to the button that checks the taglist that has been loaded already with the one on the server when you click it, and asks you if you want to edit the tags anyway, could prevent this from happening.
Additional Info:
Jerl replied at 2013-11-27 15:25:00
This could also be done server-side to reduce the number of times the site must serve out the tags for an image. When serving the page, the timestamp for the most recent change would be included. When the user submits a tag change, their browser would also submit this timestamp, and if it's different from the actual current value, the server will treat it as a tag edit collision and alert the user.

SystemError replied at 2013-11-27 15:37:22
Or instead of alerting, the system should smoothly [i]merge[/i] the different concurrent set of tags. Though that means tags can't be handled as simply a string in a whole, they will need to be parsed into a temporary string array, merged, sorted, deduped and then written back into the database in a unified string again.

Jerl replied at 2013-11-27 16:16:33
That's a lot of expensive operations for a server that has to handle thousands of users at a time.

SystemError replied at 2013-11-28 10:06:54
I had the somewhat faint impression we have to save bandwidth (serving samples of huge posts), not CPU cycles and/or RAM.

Jerl replied at 2013-11-28 14:29:21
Incorrect. Generally, hardware is just as much of a bottleneck as bandwidth.

SystemError replied at 2013-11-29 10:08:02
Well some client-side JS can do the same with two set of tags. It would also mean more communication and a bit more work for the server (asking for the latest tag string), but we're talking about strings on the order of a few hundred bytes max, not images in the several kilobyte-megabyte ranges. Also just alerting the user and requiring them to type in their tags again from scratch (since merging wouldn't be implemented) because someone else edited them meanwhile is just inconvenient as fuck imho.

Jerl replied at 2013-11-29 13:14:29
Not all users have JavaScript enabled on Gelbooru. Since the tag edit form is sent directly as a POST, it still works even if a user has JavaScript disabled. If we don't do it server-side, we can't guarantee that all collisions will be stopped.

Even just ONE collision is potentially VERY damaging, much more so than the inconvenience of having to type your tags in again. I've seen images lose 20 tags and be brought down to a total of 5 in a collision before.

lozertuser replied at 2013-11-30 08:37:49
We had this back in 0.2 I believe. Not sure what happened to it... I may have accidentally removed it.