[Nepomuk] Review Request: Client Local Socket: Check for EINTR error in socket calls

Vishesh Handa me at vhanda.in
Sun Dec 9 13:03:39 UTC 2012



> On Dec. 9, 2012, 2:09 a.m., Simeon Bird wrote:
> > client/socketstream.cpp, line 50
> > <http://git.reviewboard.kde.org/r/107607/diff/1/?file=97380#file97380line50>
> >
> >     Why was the socket access limited to 1024 bytes before?

I'm not sure, but I'm guessing it was cause of the maximum transmission unit, but we shouldn't have to care about that. The write method should write as much as it can and then return the amount it wrote.

Maybe Sebastian can shed some more light?


- Vishesh


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/107607/#review23174
-----------------------------------------------------------


On Dec. 6, 2012, 9:36 a.m., Vishesh Handa wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107607/
> -----------------------------------------------------------
> 
> (Updated Dec. 6, 2012, 9:36 a.m.)
> 
> 
> Review request for Nepomuk, Soprano, Sebastian Trueg, and Simeon Bird.
> 
> 
> Description
> -------
> 
>     Client Local Socket: Check for EINTR error in socket calls
>     
>     Sometimes the calls to select, read, and write return with an EINTR
>     (Interrupted System call) error. The documentation says that in that
>     case, one should just try again.
>     
>     This solves some of the mysterious bugs of the socket timing out, and
>     then returning errors. I could reproduce this issue by running a large
>     number of queries in parallel by the nepomuk file indexer.
>     
>     Also, cleaned up the SocketStream code a little bit. It no longer needs
>     those extra checks in its read and write functions.
> 
> 
> Diffs
> -----
> 
>   client/socket.cpp 28ac163 
>   client/socketstream.cpp 4db8be3 
> 
> Diff: http://git.reviewboard.kde.org/r/107607/diff/
> 
> 
> Testing
> -------
> 
> No more "Socket timed out error", and other problems. The errors were completely reproducible.
> 
> 
> Thanks,
> 
> Vishesh Handa
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/nepomuk/attachments/20121209/37bfe770/attachment.html>


More information about the Nepomuk mailing list