diff --git a/src/mongo/db/catalog/uncommitted_collections.h b/src/mongo/db/catalog/uncommitted_collections.h
index 5e860cc391..1ea05cec7b 100644
--- a/src/mongo/db/catalog/uncommitted_collections.h
+++ b/src/mongo/db/catalog/uncommitted_collections.h
@@ -37,6 +37,7 @@
 #include "mongo/db/catalog/collection.h"
 #include "mongo/db/namespace_string.h"
 #include "mongo/db/operation_context.h"
+#include "mongo/logv2/log_debug.h"
 
 namespace mongo {
 class UncommittedCollections {
@@ -74,6 +75,11 @@ public:
     }
 
     void receiveResources(std::shared_ptr<UncommittedCollectionsMap> resources) {
+        if (!_resourcesPtr->empty()) {
+            std::for_each(_resourcesPtr->_nssIndex.begin(), _resourcesPtr->_nssIndex.end(), [] (auto elem) {
+                logd("xxx remaining collection {} ", elem.first.toString());
+            });
+        }
         invariant(_resourcesPtr->empty());
         _resourcesPtr = resources;
     }
diff --git a/src/mongo/db/ops/insert.cpp b/src/mongo/db/ops/insert.cpp
index fff03006b9..8a4db6cba1 100644
--- a/src/mongo/db/ops/insert.cpp
+++ b/src/mongo/db/ops/insert.cpp
@@ -216,17 +216,11 @@ Status userAllowedCreateNS(const NamespaceString& ns) {
                                     << " Max: " << NamespaceString::MaxNsCollectionLen);
     }
 
-    if (ns.coll().find(".system.") != std::string::npos) {
-        // Writes are permitted to the persisted chunk metadata collections. These collections are
-        // named based on the name of the sharded collection, e.g.
-        // 'config.cache.chunks.dbname.collname'. Since there is a sharded collection
-        // 'config.system.sessions', there will be a corresponding persisted chunk metadata
-        // collection 'config.cache.chunks.config.system.sessions'. We wish to allow writes to this
-        // collection.
-        if (ns.coll().find(".system.sessions") != std::string::npos) {
-            return Status::OK();
-        }
+    if (ns.isConfigDotCacheDotChunks()) {
+        return Status::OK();
+    }
 
+    if (ns.coll().find(".system.") != std::string::npos) {
         return Status(ErrorCodes::BadValue, str::stream() << "Invalid namespace: " << ns);
     }
 
diff --git a/src/mongo/db/s/config/configsvr_reshard_collection_cmd.cpp b/src/mongo/db/s/config/configsvr_reshard_collection_cmd.cpp
index 96b4f845b2..06329c1d71 100644
--- a/src/mongo/db/s/config/configsvr_reshard_collection_cmd.cpp
+++ b/src/mongo/db/s/config/configsvr_reshard_collection_cmd.cpp
@@ -46,6 +46,16 @@
 namespace mongo {
 namespace {
 
+std::vector<TagsType> convertZones(const std::vector<BSONObj>& objs) {
+    std::vector<TagsType> zones;
+
+    for (const BSONObj& obj : objs) {
+        zones.push_back(uassertStatusOK(TagsType::fromBSON(obj)));
+    }
+
+    return zones;
+}
+
 class ConfigsvrReshardCollectionCommand final
     : public TypedCommand<ConfigsvrReshardCollectionCommand> {
 public:
@@ -85,6 +95,7 @@ public:
                         !collator);
             }
 
+            std::vector<TagsType> newZones;
             const auto& authoritativeTags = uassertStatusOK(
                 Grid::get(opCtx)->catalogClient()->getTagsForCollection(opCtx, nss));
             if (!authoritativeTags.empty()) {
@@ -92,6 +103,7 @@ public:
                         "Must specify value for zones field",
                         request().getZones());
                 validateZones(request().getZones().get(), authoritativeTags);
+                newZones = convertZones(request().getZones().get());
             }
 
             const auto cm = uassertStatusOK(
@@ -113,6 +125,11 @@ public:
 
             int numInitialChunks;
             std::set<ShardId> recipientShardIds;
+            std::vector<ChunkType> initialChunks;
+            ChunkVersion version(1, 0, OID::gen());
+
+            auto tempReshardingNSS = constructTemporaryReshardingNss(nss, cm);
+
             if (presetReshardedChunksSpecified) {
                 const auto chunks = request().get_presetReshardedChunks().get();
                 validateReshardedChunks(
@@ -124,6 +141,17 @@ public:
                 for (const BSONObj& obj : chunks) {
                     recipientShardIds.emplace(
                         obj.getStringField(ReshardedChunk::kRecipientShardIdFieldName));
+
+                    
+
+                    auto reshardedChunk =
+                        ReshardedChunk::parse(IDLParserErrorContext("ReshardedChunk"), obj);
+                    initialChunks.emplace_back(
+                        tempReshardingNSS,
+                        ChunkRange{reshardedChunk.getMin(), reshardedChunk.getMax()},
+                        version,
+                        reshardedChunk.getRecipientShardId());
+                    version.incMinor();
                 }
             } else {
                 numInitialChunks = request().getNumInitialChunks().get_value_or(cm.numChunks());
@@ -131,6 +159,15 @@ public:
                 // No presetReshardedChunks were provided, make the recipients list be the same as
                 // the donors list by default.
                 recipientShardIds = donorShardIds;
+
+                cm.forEachChunk([&](const auto& chunk) {
+                    initialChunks.emplace_back(tempReshardingNSS,
+                                               ChunkRange{chunk.getMin(), chunk.getMax()},
+                                               version,
+                                               chunk.getShardId());
+                    version.incMinor();
+                    return true;
+                });
             }
 
             // Construct the lists of donor and recipient shard entries, where each ShardEntry is
@@ -172,6 +209,8 @@ public:
             auto service = registry->lookupServiceByName(kReshardingCoordinatorServiceName);
             auto instance = ReshardingCoordinatorService::ReshardingCoordinator::getOrCreate(
                 opCtx, service, coordinatorDoc.toBSON());
+
+            instance->setInitialChunksAndZones(initialChunks, newZones);
         }
 
     private:
diff --git a/src/mongo/db/s/resharding/resharding_coordinator_service.cpp b/src/mongo/db/s/resharding/resharding_coordinator_service.cpp
index c5177cffeb..48ed7b288b 100644
--- a/src/mongo/db/s/resharding/resharding_coordinator_service.cpp
+++ b/src/mongo/db/s/resharding/resharding_coordinator_service.cpp
@@ -39,6 +39,9 @@
 #include "mongo/db/s/config/sharding_catalog_manager.h"
 #include "mongo/db/s/resharding_util.h"
 #include "mongo/logv2/log.h"
+#include "mongo/logv2/log_debug.h"
+#include "mongo/db/repl/repl_client_info.h"
+#include "mongo/db/repl/wait_for_majority_service.h"
 #include "mongo/rpc/get_status_from_command_result.h"
 #include "mongo/s/catalog/type_chunk.h"
 #include "mongo/s/grid.h"
@@ -266,11 +269,16 @@ void insertChunkAndTagDocsForTempNss(OperationContext* opCtx,
                    initialChunksBSON.begin(),
                    [](ChunkType chunk) { return chunk.toConfigBSON(); });
 
-    ShardingCatalogManager::get(opCtx)->insertConfigDocumentsInTxn(opCtx,
+    try {
+            ShardingCatalogManager::get(opCtx)->insertConfigDocumentsInTxn(opCtx,
                                                                    ChunkType::ConfigNS,
                                                                    std::move(initialChunksBSON),
                                                                    false,  // startTransaction
                                                                    txnNumber);
+    } catch (const DBException& ex) {
+        logd("xxx dbex: {}", ex.toString());
+    }
+
 
     // Insert tag documents for temp nss
     std::vector<BSONObj> zonesBSON(newZones.size());
@@ -363,7 +371,10 @@ std::vector<ShardId> extractShardIds(const std::vector<T>& participantShardEntri
     std::transform(participantShardEntries.begin(),
                    participantShardEntries.end(),
                    shardIds.begin(),
-                   [](auto& shardEntry) { return shardEntry.getId(); });
+                   [](auto& shardEntry) { 
+                       return 
+                   shardEntry.getId(); });
+
     return shardIds;
 }
 }  // namespace
@@ -405,6 +416,13 @@ void persistInitialStateAndCatalogUpdates(OperationContext* opCtx,
         opCtx, coordinatorDoc.getNss(), repl::ReadConcernLevel::kMajorityReadConcern));
     const auto collation = originalCollType.value.getDefaultCollation();
 
+    /*{
+        DBDirectClient dbClient(opCtx);
+        dbClient.createCollection(NamespaceString::kConfigReshardingOperationsNamespace.toString());
+        auto latestOpTime = repl::ReplClientInfo::forClient(opCtx->getClient()).getLastOp();
+        WaitForMajorityService::get(opCtx->getServiceContext()).waitUntilMajority(latestOpTime).wait();
+    }*/
+
     withAlternateSession(opCtx, [=](OperationContext* opCtx, TxnNumber txnNumber) {
         // Insert state doc to config.reshardingOperations
         writeToCoordinatorStateNss(opCtx, coordinatorDoc, txnNumber);
@@ -791,6 +809,7 @@ void ReshardingCoordinatorService::ReshardingCoordinator::_tellAllRecipientsToRe
     const std::shared_ptr<executor::ScopedTaskExecutor>& executor) {
     auto opCtx = cc().makeOperationContext();
     auto recipientIds = extractShardIds(_coordinatorDoc.getRecipientShards());
+
     tellShardsToRefresh(
         opCtx.get(), recipientIds, _coordinatorDoc.getTempReshardingNss(), **executor);
 }
diff --git a/src/mongo/s/resharding/common_types.idl b/src/mongo/s/resharding/common_types.idl
index 4f85199bef..db35041619 100644
--- a/src/mongo/s/resharding/common_types.idl
+++ b/src/mongo/s/resharding/common_types.idl
@@ -95,7 +95,7 @@ structs:
                 type: uuid
                 description: "The UUID of the original collection being resharded."
             reshardingKey:
-                type: object
+                type: object_owned
                 description: "The index specification document to use as the new shard key."
 
     MinFetchTimestamp:
