Skip to content

tsdb: Any particular reason, why tsl_format_all() is called if a bad sector detected? #383

@onopche

Description

@onopche

Hello, team! I'm running FlashDB on an embedded device with no backup power. Obviously, if a power interruption happens at some point between sector erase and writing headers, the sector becomes bad as it looses some key header data. It makes perfect sense, but in this case on a subsequent fdb_tsdb_init call tsl_format_all() is called that discards all data stored in the partition. I'm just wondering, why is that? AFAICS, tsdb has enough info to carry on regardless bad sector. Thereby only the bad sector could be formatted, isn't it? Or I'm reading it wrong?
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions