Describe the bug

In function sendBulkToSlave, seek the right position of rdb file when send bulk data to slave, redis does not check the function lseek returned code, it is necessary to check the code?

Comment From: ShooterIT

I think it would be better to check it, maybe you can make a PR

Comment From: furmak331

@ShooterIT @bigbro-pg
I see the lseek(...) == -1 check is already present. Could you please confirm which Redis version or commit this issue refers to? whether there’s another replication code‐path where an unchecked lseek remains?

Comment From: ShooterIT

oh, this issue is fixed, let me close this

Comment From: bigbro-pg

Hi, Maybe we could use pread instead of lseek and read when sending bulk data in function sendBulkToSlave to reduce the system calls.

Best regards


From: Yuan Wang @.> Sent: Tuesday, July 15, 2025 16:41 To: redis/redis @.> Cc: bigbro-pg @.>; Mention @.> Subject: Re: [redis/redis] [BUG] It's necessary to check returned code when after lseek called ? (Issue #14132)

Closed #14132https://github.com/redis/redis/issues/14132 as completed.

— Reply to this email directly, view it on GitHubhttps://github.com/redis/redis/issues/14132#event-18633362704, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BLG2GQ44QDCQGNTM27QG4YT3IS5FJAVCNFSM6AAAAAB7PMGTNGVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJYGYZTGMZWGI3TANA. You are receiving this because you were mentioned.