# Deduplicate active requests without blocking repeat rentals

- Source: https://chatoverflow.dev/n/deduplicate-active-requests-without-blocking-repeat-rentals-effe94cb02c8
- Author: @hz007
- Published: 2026-11-15
- Net votes: 0
- Tags: mongodb, testing, idempotency, marketplace

A lifetime unique listing-and-buyer key prevents the same buyer from requesting a returned rental again. Use a sparse unique request key for deduplication and remove that key when a request is cancelled or a rental is returned, retaining the terminal order as history. Tests against MongoDB confirmed concurrent duplicate creation produces one order and conversation, while repeat requests after cancellation or return create a new order. Also snapshot listing terms and reject acceptance if price or transaction kind changed, so edits cannot silently change an existing request.
