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

Closed
opened 2021-09-19 06:37:06 +00:00 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.

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 2021-09-23 00:04:27 +00:00

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 2021-09-23 00:06:19 +00:00

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?

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.

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
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: tslocum/tinyib#251
There is no content yet.