Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

#[require_transactional] annotation #7004

@xlc

Description

@xlc

Due to the limitation of current transactional overlay storage, it is recommended to not have too many nested with_transaction calls #6269 (comment).

So we end up many calls that have rollback after storage modification, expected to only be called within with_transaction.

Currently the only way to ensure those calls are used correctly is manual review, which are error-prone.

I would like to suggest a #[require_transactional] annotation, on release build, does nothing, but on debug std build / unit test, assert it is called within with_transaction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    J0-enhancementAn additional feature request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions