Use file lock (flock) to prevent concurrency issues #251

Closed
opened 8 months ago by ghost123321 · 5 comments

Even with TINYIB_DELAY set to half a minute, sometimes if when posting you press the 'Submit' button quick twice, the same post will be posted twice, bypassing TINYIB_DELAY.
Saw this happen 3 times to other users already, and happened to myself when posting.

Oh also this allows to upload the same file twice, even if duplicated files are disabled.
I couldn't replicate it on purpose though but will take a screenshot next time it happens.

Even with TINYIB_DELAY set to half a minute, sometimes if when posting you press the 'Submit' button quick twice, the same post will be posted twice, bypassing TINYIB_DELAY. Saw this happen 3 times to other users already, and happened to myself when posting. Oh also this allows to upload the same file twice, even if duplicated files are disabled. I couldn't replicate it on purpose though but will take a screenshot next time it happens.
Poster

Forgot to mention, on flatfile mode.

Forgot to mention, on flatfile mode.
tslocum changed title from TINYIB_DELAY not fully working. to Use file lock (flock) to prevent concurrency issues 8 months ago
Owner

Flat file really should be avoided when possible. Please use the migration tool to switch to SQLite3 or another database mode if you can.

I'll look into using flock to process incoming posts serially.

Flat file really should be avoided when possible. Please use the migration tool to switch to SQLite3 or another database mode if you can. I'll look into using `flock` to process incoming posts serially.
tslocum added the
bug
label 8 months ago
Poster

oh but the single thing I liked the most about TinyIB over other ib software is flatfile , should it be avoided for now because of the bugs or avoided always because its only meant to be for testing or whatever?

oh but the single thing I liked the most about TinyIB over other ib software is flatfile , should it be avoided for now because of the bugs or avoided always because its only meant to be for testing or whatever?
Owner

Until this issue, there weren't any bugs with flat file (as far as I'm aware). I am recommending against flat file here and in the README because it is very slow. This isn't a problem for all sites, but if you want to use a file-based database, SQLite3 is a much better database mode. The included migration tool makes it easy to try different modes.

Until this issue, there weren't any bugs with flat file (as far as I'm aware). I am recommending against flat file here and in the README because it is very slow. This isn't a problem for all sites, but if you want to use a file-based database, SQLite3 is a much better database mode. The included migration tool makes it easy to try different modes.
Poster

oh okay, another question, does the moderation log work for you in flatfile? it dosn't for me

oh okay, another question, does the moderation log work for you in flatfile? it dosn't for me
tslocum closed this issue 1 month ago
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.