Skip to content

PartitionManager only allows int32_t-valued IDs — necessary restriction? #67

@alexandergunnarson

Description

@alexandergunnarson

Hey! First of all, amazing work on Quake!

I was wondering whether the below restriction in the PartitionManager is necessary:

// check ids are below max id
if ((vector_ids > std::numeric_limits<int32_t>::max()).any().item<bool>()) {
    throw runtime_error("[PartitionManager] add: vector_ids must be less than INT_MAX.");
}

If I were to comment this out, would problems happen? It appears int64_t IDs are used everywhere. Maybe some implementation detail relies on them being limited to the int32_t space?

Also, I wonder what the effect of using negative IDs is. They are technically permitted (except for -1, which is a sentinel value) — technically the minimum value of int64_t is allowed, so it seems an arbitrary cutoff to have such a large negative space available while the positive space gets cut off at int32_t.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions