> While testing yours, I found that the leader apply worker has been crashed in 
> the
> following case.
> I will dig the failure more, but I reported here for records.

I found a reason why the leader apply worker crasehes.
In parallel_apply_free_worker() the leader sends the pending message to 
parallel apply worker:

```
+               /*
+                * Resend the pending message to parallel apply worker to 
cleanup the
+                * queue. Note that parallel apply worker will just ignore this 
message
+                * as it has already handled this message while applying spooled
+                * messages.
+                */
+               result = shm_mq_send(winfo->mq_handle, 
strlen(winfo->pending_msg),
+                                                        winfo->pending_msg, 
false, true);
```

...but the message length should not be calucarete by strlen() because the 
logicalrep message has '\0'.
PSA the patch to fix it. It can be applied on v42 patch set.


Best Regards,
Hayato Kuroda
FUJITSU LIMITED

Attachment: 0001-fix-wrong-message-length-estimation.patch
Description: 0001-fix-wrong-message-length-estimation.patch

Reply via email to