libafpclient: avoid DSI synchronous teardown on server close - #343
Conversation
|
This is rather serendipitous! When the server runs out of IDs (exhausts primary key), it has no choice but to truncate the table and disconnect all users gracefully - so when users log back in, the CNID can be rebuilt automatically from scratch gracefully. Hence it requires a new DB_RESET hint (and the PR to get ASP hooked up to IPC hints finally). Granted it takes years to exhaust a 32bit primary key, but without the fix, Netatalk currently just hits a wall and becomes unusable until an admin knows they have to delete the CNID DB. |
Handle an incoming DSICloseSession as transport loss. Do not flush or detach volumes from the DSI receiver, where those synchronous requests cannot receive replies and can free live FUSE fork records. Preserve local state for later reconnect.
|
|
I'm looking forward to seeing the analysis and fix! the 32 bit primary key exhaustion was on my mind when putting together the sqlite backend, and I simulated exhaustion by triggering the CNID_SQLITE_FLAG_DEPLETED (and CNID_MYSQL_FLAG_DEPLETED) flag by artificial means to observe the id recycling logic. but I admittedly did not test the genuine 32 bit exhaustion, or any other sophisticated scenarios beyond the sanity test |



Handle an incoming DSICloseSession as transport loss. Do not flush or detach volumes from the DSI receiver, where those synchronous requests cannot receive replies and can free live FUSE fork records. Preserve local state for later reconnect.