-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Task
Implement POST /rooms/{roomId}/lamps/bulk-move with proper transaction isolation.
Endpoint
POST /rooms/{roomId}/lamps/bulk-move
{
"lampIds": ["uuid1", "uuid2", "uuid3"],
"targetRoomId": "target-uuid"
}Functional Requirement
- Must be atomic - either all lamps move or none do
- Must handle concurrent requests safely - no race conditions
Implementation Hints
- Use
using var transaction = await context.Database.BeginTransactionAsync() - Consider
IsolationLevel.Serializablefor strict isolation - Use
ExecuteUpdateAsyncfor bulk updates - Call
transaction.CommitAsync()only on success
Acceptance Criteria
- All lamps move to target room on success
- No lamps move if any validation fails (atomic)
- Returns 409 if any lamp doesn't belong to source room
- Concurrent requests don't cause data corruption
Parent Issue
Relates to #289
Reactions are currently unavailable