M
Mastraβ€’4w ago
arpitBhalla

Parallel Steps `writer.custom` throwing writer is locked

Works for sequencial steps, but getting error for parallel
5 Replies
Mastra Triager
Mastra Triagerβ€’4w ago
πŸ“ Created GitHub issue: https://github.com/mastra-ai/mastra/issues/10152 πŸ” If you're experiencing an error, please provide a minimal reproducible example to help us resolve it quickly. πŸ™ Thank you @arpitBhalla for helping us improve Mastra!
GitHub
Parallel Steps writer.custom throwing writer is locked Β· Issue #...
This issue was created from Discord post 1439609729952514170: Works for sequencial steps, but getting error for parallel
Stack Overflow
How to create a Minimal, Reproducible Example - Help Center
Stack Overflow | The World’s Largest Online Community for Developers
Grayson
Graysonβ€’4w ago
Could you please post more information and a minimal reproduction? Thanks!
arpitBhalla
arpitBhallaOPβ€’4w ago
Something like this
createWorkflow({
id: 'log-workflow',
inputSchema: z.any(),
outputSchema: z.any(),
})
.parallel([
createStep({
id: 'log-step-1',
description: '',
inputSchema: z.any(),
outputSchema: z.any(),
execute: ({writer}) => writer.custom({type: 'data-log', data: {}}),
}),
createStep({
id: 'log-step-2',
description: '',
inputSchema: z.any(),
outputSchema: z.any(),
execute: ({writer}) => writer.custom({type: 'data-log', data: {}}),
}),
])
.commit();
createWorkflow({
id: 'log-workflow',
inputSchema: z.any(),
outputSchema: z.any(),
})
.parallel([
createStep({
id: 'log-step-1',
description: '',
inputSchema: z.any(),
outputSchema: z.any(),
execute: ({writer}) => writer.custom({type: 'data-log', data: {}}),
}),
createStep({
id: 'log-step-2',
description: '',
inputSchema: z.any(),
outputSchema: z.any(),
execute: ({writer}) => writer.custom({type: 'data-log', data: {}}),
}),
])
.commit();
Ward
Wardβ€’4w ago
It's on the list to get these things solved this week
Abhi Aiyer
Abhi Aiyerβ€’3w ago
GitHub
Parallel stream fix by abhiaiyer91 Β· Pull Request #10463 Β· mastra...
Fixes #10152 Summary by CodeRabbit Improvements Custom writer method now returns a Promise, ensuring writes are performed sequentially with proper serialization. Tests Added comprehensive t...

Did you find this page helpful?