TIP: Click on subject to list as thread! ANSI
echo: sync_programming
to: Git commit to main/sbbs/m
from: Rob Swindell (on Debian L
date: 2024-12-05 17:00:00
subject: src/sbbs3/userdat.c src/x

https://gitlab.synchro.net/main/sbbs/-/commit/03b84df8570435f0e0e2c346
Modified Files:
	src/sbbs3/userdat.c src/xpdev/filewrap.c filewrap.h
Log Message:
Add/use xp_lockfile() to support blocking file range/region lock acquisition

Under heavy loads, I've found periodic non-blocking lock attempts just aren't
reliable enough: in particular, on Vertrauen, the guest user account record
in the user.tab file gets read and written-to A LOT (updating stats), and
under heavy loads (especially with hundreds of web client sessions), I'd get
timeouts attempting to lock the guest record in the user.tab (after about a
minute of periodic retries) - so let's just block "forever" to get the user
record lock (or until signaled or notified of a deadlock). With this change,
I've not had any user.tab lock errors or apparent deadlocks.

Let the underlying OS/filesystem handle queuing and deadlock detection,
when supported. lock() still behaves as before: non-blocking lock attempt.
--- SBBSecho 3.23-Linux
                                                                                            
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)

SOURCE: echomail via QWK@pharcyde.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.