Skip to content

numBytesToRead out of range when recover from large amounts of records #946

@aiomind

Description

@aiomind

FASTERA\cs\src\core\Allocator\MallocFixedPageSize.cs Line 553

int numRecords = (int)numBytesToRead / RecordSize;

When numBytesToRead greater than int.Max() recover will stuck

My fix:
int numRecords = (int)(numBytesToRead / (ulong)RecordSize);

Not sure if this will cause other problems

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions