From 70812e4199877d549275d478b1f57c866b2ef32d Mon Sep 17 00:00:00 2001 From: Naman Jain Date: Wed, 19 May 2021 22:10:55 +0530 Subject: [PATCH] fix(restore): reset the kv.StreamId before sending to stream writer (#7833) (#7837) Reset the StreamId for the schema key to prevent ordering issues. (cherry picked from commit 9557e56d03980fa2df2648f35b2d39b68f34b115) --- worker/restore_map.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/worker/restore_map.go b/worker/restore_map.go index 8474066189c..84a9519bfe8 100644 --- a/worker/restore_map.go +++ b/worker/restore_map.go @@ -397,6 +397,8 @@ func (m *mapper) processReqCh(ctx context.Context) error { return nil } } + // Reset the StreamId to prevent ordering issues while writing to stream writer. + kv.StreamId = 0 // Schema and type keys are not stored in an intermediate format so their // value can be written as is. kv.Key = restoreKey