Skip to content

Vortex introduced a breaking semantic change to ScalarFnId::new which did not surface as compilation errors in consumers #8380

@danking

Description

@danking

What happened?

Previously we wrote ScalarFnId::new and this was reasonable quick, even if invoked across tens of threads.

After a recent Vortex change, this started grabbing locks which substantially reduced the rate at which this method could be called in a multi-threaded environment.

     type Options = BlobBytesOptions;
 
     fn id(&self) -> ScalarFnId {
-        ScalarFnId::new("spiral.blob.bytes")
+        static ID: CachedId = CachedId::new("spiral.blob.bytes");
+        *ID
     }

I would have preferred a compilation error. Even better, could ScalarFnId::new be implemented as above?

Steps to reproduce

see above

Environment

macOS

vortex: 1b19ac9

Additional context

No response

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