iris-hep / idap-200gbps-atlas

benchmarking throughput with PHYSLITE
6 stars 1 forks source link

Changing `Sample`'s name caues a cache miss #135

Open gordonwatts opened 2 months ago

gordonwatts commented 2 months ago

In the code below, Name is set to a particular thing. If you run, and then re-run you'll get a cache hit. Which is as expected. However, if you change only the Name, the cache seemed to miss, which is unexpected.

    spec = sx.ServiceXSpec(
        General=sx.General(
            ServiceX="atlasr22",
            Codegen=query[1],
            OutputFormat=sx.ResultFormat.root,  # type: ignore
            Delivery=("LocalCache" if download else "SignedURLs"),  # type: ignore
        ),
        Sample=[
            sx.Sample(
                Name=f"speed_test_{ds_name}"[0:128],
                RucioDID=ds_name,
                Codegen=query[1],
                Query=query[0],
                NFiles=num_files,
                IgnoreLocalCache=ignore_cache,
            )  # type: ignore
            for ds_name in ds_names
        ],
    )

Also, changing the name can cause one to have two entries in the hash database code for the query cache. I've also seen that in other circumstances (btw):