Closed mschubert closed 5 years ago
Are there any other places where we should replace int with x_len_t ?
Merging #47 into master will not change coverage. The diff coverage is
50%
.
@@ Coverage Diff @@
## master #47 +/- ##
=======================================
Coverage 33.72% 33.72%
=======================================
Files 4 4
Lines 685 685
=======================================
Hits 231 231
Misses 454 454
Impacted Files | Coverage Δ | |
---|---|---|
src/interface.cpp | 28.71% <50%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 85ee8ac...60e44e6. Read the comment docs.
Message sizes are never explicitly stored in interface.cpp
, this is all handled by ZeroMQ.
So no, no need to replace anything else as far as I can tell.
rzmq
currently does not allow sending long vectors as messages. Those are array-like objects whose size is bigger than the integer maximum.Initializing a message object (or using
rzmq::send.socket
) works with vectors smaller than the integer size maximum,but fails for vectors that are bigger:
The reason for this is that the serialized object's length is queried using the
length
function, which returns an integer and triggers an R internal assertion error.If we instead use
Rf_xlength
(size_t
type), the length query succeeds and we can serialize larger vectors torzmq
messages.While this could be seen as a guard to not serialize large objects, I would argue that the limit on what makes sense is application specific and packages using
rzmq
should set their own limits.