Parallel SOC POST requests do not push chunks sometimes
⚠️ Support requests in an issue-format will be closed immediately. For support, go to Swarm's Discord.
Context
I'm testing out GSOC functionality which uses fdp-play for environment (5 nodes network). It implies that I'm pushing several chunks under one SOC address. nevertheless, I do not think it causes the problem.
Based on Bee 2.2
Related logs
Performed 7 POST soc chunk requests in the same time.
"time"="2024-09-20 15:29:25.128875" "level"="debug" "logger"="node/pushsync" "msg"="chunk pushed" "chunk_address"="2a41c7273b438b83e7ff1414fa9230c7499ed004a30d760221098210f1454570" "peer_address"="48013b5c5142e482759f08ef60057b4bbb7cb2e77790b44e3f06b235493347d4" "proximity_order"=1
"time"="2024-09-20 15:29:25.129600" "level"="debug" "logger"="node/pushsync" "msg"="chunk pushed" "chunk_address"="2a41c7273b438b83e7ff1414fa9230c7499ed004a30d760221098210f1454570" "peer_address"="1ec1e220b1f6ab66005fb8308fb97f73174a1eaabe18b39158cea52a48143e08" "proximity_order"=2
"time"="2024-09-20 15:29:25.130428" "level"="info" "logger"="node/api" "msg"="api access" "ip"="172.22.0.1" "method"="POST" "host"="127.0.0.1:1633" "uri"="/soc/54a948b3d76ce84e5c7b4b3cd01f2af1f18d41e0/00c76c767b3ee7a559789441849eb4d3709f43017dc0cb008c87fbb17e05335e?sig=ff417fd678c0b45f791cc50285bdc1bfab0590b76e51c35f92b482aee9ec70821d011c214e9a84493dae3b5369b0b53e1838099effb3afde058255ba959fdbb41c" "proto"="HTTP/1.1" "status"=201 "size"=94 "duration"="4.657398ms" "user-agent"="axios/1.7.2"
"time"="2024-09-20 15:29:25.135495" "level"="info" "logger"="node/api" "msg"="api access" "ip"="172.22.0.1" "method"="POST" "host"="127.0.0.1:1633" "uri"="/soc/54a948b3d76ce84e5c7b4b3cd01f2af1f18d41e0/00c76c767b3ee7a559789441849eb4d3709f43017dc0cb008c87fbb17e05335e?sig=ccfc7230f5f3ca96a98479e0a80249daa7a3b10df68c61e7b2da933ae471aeac48a2094b32e8fc2a4af5430512b275f7d702319cec38b2133ef82abcf736d1271c" "proto"="HTTP/1.1" "status"=201 "size"=94 "duration"="9.292245ms" "user-agent"="axios/1.7.2"
"time"="2024-09-20 15:29:25.135839" "level"="debug" "logger"="node/pushsync" "msg"="chunk pushed" "chunk_address"="2a41c7273b438b83e7ff1414fa9230c7499ed004a30d760221098210f1454570" "peer_address"="48013b5c5142e482759f08ef60057b4bbb7cb2e77790b44e3f06b235493347d4" "proximity_order"=1
"time"="2024-09-20 15:29:25.139610" "level"="info" "logger"="node/api" "msg"="api access" "ip"="172.22.0.1" "method"="POST" "host"="127.0.0.1:1633" "uri"="/soc/54a948b3d76ce84e5c7b4b3cd01f2af1f18d41e0/00c76c767b3ee7a559789441849eb4d3709f43017dc0cb008c87fbb17e05335e?sig=5fa4f7e90da84771fc9726af6885a73df5f46a31dce6b9cf86bd2749075b35a7602894cd4805b3e83dfc2c522d8620cf23ab71d01cd4364ea6ca47f0b304a6871c" "proto"="HTTP/1.1" "status"=201 "size"=94 "duration"="13.495404ms" "user-agent"="axios/1.7.2"
"time"="2024-09-20 15:29:25.142735" "level"="info" "logger"="node/api" "msg"="api access" "ip"="172.22.0.1" "method"="POST" "host"="127.0.0.1:1633" "uri"="/soc/54a948b3d76ce84e5c7b4b3cd01f2af1f18d41e0/00c76c767b3ee7a559789441849eb4d3709f43017dc0cb008c87fbb17e05335e?sig=b4ab2c8059aff5ae79b263cdfaa2ee6a2e185708207ee319b2e2dfc96b03896f12cbf64870bb92b01bf026626e7a31af0814197b092194f2065f2e1fcf4bb8a71b" "proto"="HTTP/1.1" "status"=201 "size"=94 "duration"="16.905752ms" "user-agent"="axios/1.7.2"
"time"="2024-09-20 15:29:25.147801" "level"="info" "logger"="node/api" "msg"="api access" "ip"="172.22.0.1" "method"="POST" "host"="127.0.0.1:1633" "uri"="/soc/54a948b3d76ce84e5c7b4b3cd01f2af1f18d41e0/00c76c767b3ee7a559789441849eb4d3709f43017dc0cb008c87fbb17e05335e?sig=238c259adcf672c7788a6a4d684c8a421f41806618b63acd84119d5a01564c514e708cc0729ad2b59fa714af3c496eedc3e733c9b98c4d02fa140125f14fe5391b" "proto"="HTTP/1.1" "status"=201 "size"=94 "duration"="22.008555ms" "user-agent"="axios/1.7.2"
"time"="2024-09-20 15:29:25.153494" "level"="info" "logger"="node/api" "msg"="api access" "ip"="172.22.0.1" "method"="POST" "host"="127.0.0.1:1633" "uri"="/soc/54a948b3d76ce84e5c7b4b3cd01f2af1f18d41e0/00c76c767b3ee7a559789441849eb4d3709f43017dc0cb008c87fbb17e05335e?sig=983397ccb1cbc2423dc75c50b2a2015bf9d056e51b3b621b142b992d2b95de91689028c4c54439476db8cac82f3532a317e7e0a3e8877e9ae97870c8d6ae3a421c" "proto"="HTTP/1.1" "status"=201 "size"=94 "duration"="27.038545ms" "user-agent"="axios/1.7.2"
"time"="2024-09-20 15:29:25.157900" "level"="info" "logger"="node/api" "msg"="api access" "ip"="172.22.0.1" "method"="POST" "host"="127.0.0.1:1633" "uri"="/soc/54a948b3d76ce84e5c7b4b3cd01f2af1f18d41e0/00c76c767b3ee7a559789441849eb4d3709f43017dc0cb008c87fbb17e05335e?sig=2e05135ac1bee9389587c4b7d147e56c415f6201a7b91720dac567d00547444870d05c83b6213d00051c6e0a9cd196a52209fc3d20e45e28228685bcd3ba9d161b" "proto"="HTTP/1.1" "status"=201 "size"=94 "duration"="31.931324ms" "user-agent"="axios/1.7.2"
Summary
If I call POST SOC sequentially one-by-one everything works as expected, but if I do this parallel, some chunks will not be pushed to the network still returns with successful 201 response.
From the logs, it can be seen by searching the term chunk pushed how many successful pushes have happened
and ,"status"=201 is the key to show successful API responses.
Expected behavior
All chunks pushed to the network (7 out of 7)
Actual behavior
Not all chunks have been pushed to the network (3-4 out of 7) Moreover, it does not show any error about the push failure from the API side.
Steps to reproduce
Build GSOC subscribe branch with FDP Play then run test of GSOC: npm run test -- -t 'send messages with different postage batches parallel'.
npm run test -- -t 'send message with different postage batches sequentially' shows that it works sequentially.