fix: add order:true to all create transactions (#3948)

This commit is contained in:
Finley Ge
2025-03-03 11:37:51 +08:00
committed by GitHub
parent 113e8f711f
commit 4bc7f21182
30 changed files with 425 additions and 352 deletions

View File

@@ -216,7 +216,7 @@ export async function createOneCollection({
nextSyncTime
}
],
{ session }
{ session, ordered: true }
);
return collection;

View File

@@ -97,7 +97,7 @@ export const createOrGetCollectionTags = async ({
datasetId,
tag: tagContent
})),
{ session }
{ session, ordered: true }
);
return [...existingTags.map((tag) => tag._id), ...newTags.map((tag) => tag._id)];

View File

@@ -196,7 +196,8 @@ export async function syncCollaborators({
permission: item.permission
})),
{
session
session,
ordered: true
}
);
}

View File

@@ -100,7 +100,7 @@ export const initTeamFreePlan = async ({
surplusPoints: freePoints
}
],
{ session }
{ session, ordered: true }
);
};

View File

@@ -160,7 +160,7 @@ export const createTrainingUsage = async ({
]
}
],
{ session }
{ session, ordered: true }
);
return { billId: String(_id) };