On 2018/03/07 12:08, Nicholas Nethercote wrote:
Hi,

I've been doing a lot of work to improve libpref recently, and there is
more in the pipeline. I've written a brief roadmap that might be of
interest to people: https://wiki.mozilla.org/Platform/PrefsOverhaul

I'd be happy to hear feedback, via this list or other means. Thanks.

Nick

I have noticed that you mentioned rewrite in Rust.

Does the I/O primitive Rust uses handle the following "short read" case niciely?

Suppose, prefs file (user profile) is stored on a remote file server.
Based on the network congestion and/or server load, the remote file server may end up returning shorter than requested octet strings.
(This can happen for real.)
Under linux, the I/O primitive does not read the remaining octets.
Under Windows, the I/O primitive seems to automagically handles the reading of remaining octets as far as the remote file server is CIFS. (I don't know about NFS.)

Does libpres under linux handles such short-read cases?

I have filed a few bugzilla for TB's failure to tackle this situation (under linux), but I have noticed the issue is deep within M-C portion of the code, too.

Bugzilla:
Bug 1170646 - A few M-C fixes to handle short read in Cache code ( from [META] Failure to deal with short read)

and related bugs there.

Bug 1170578 - RFC: Buggy NSS dbm code ought to be updated
1170606  <--- this is C-C TB side noted below.
Bug 1170668 - Failure to handle short read: the case of reading a JSON file into JavaScript 'String' type. ( [META] Failure to deal with short read)

1172304 <-- fixed.

On the purely C-C TB side:

Bug 1170606 - C-C T-B fixes to take care of short read (part of [META] Failure to deal with short read)
and 1170646 mentioned there.

cf. My comment about short write of PR_Write() in the currently last comment of
https://bugzilla.mozilla.org/show_bug.cgi?id=1170564
may be misguided.
I found that PR_Write() is automatically retried even under Linux.

PPS: MS-Windows seems to handle this under the hood: the I/O routines are mapped to MS syscalls and they seem to handle the short read issue on the OS side very well.


_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to