Azurite icon indicating copy to clipboard operation
Azurite copied to clipboard

Last Access Time Tracking for Blobs

Open maikschulze opened this issue 11 months ago • 3 comments

Dear Azurite developers,

Would it be feasible to add support for last access time tracking for blobs in Azurite?

On Azure, this can be enabled as following: https://learn.microsoft.com/en-us/azure/storage/blobs/lifecycle-management-policy-configure?tabs=azure-portal#optionally-enable-access-time-tracking and results in operations such as List Blobs to return the attribute properties:lastaccesstime for every blob.

This would be helpful in Azurite, for example, to draft solutions for cleanup mechanisms that go beyond the abilities of lifecycle management policies, or for synchronization mechanisms based on data usage.

There appears to be a sole mention for lastaccesstime in the code https://github.com/Azure/Azurite/blob/c3f93445fbd8fd54d380eb265a5665166c460d2b/src/blob/generated/artifacts/mappers.ts#L439 but I suppose, it's not implement, is it?

Thank You Maik

maikschulze avatar Jan 23 '25 14:01 maikschulze

Blob Last access time is still not implemented in Azurite. Azurite Readme.md file include the info: https://github.com/Azure/Azurite#:~:text=Blob%20Last%20Access%20Time

We might don't have enough bandwidth for this feature in the recent future.

Azurite welcome contribution! It would be great if you could raise a PR to implement it!

blueww avatar Jan 27 '25 04:01 blueww

Hi @blueww , thank you for your reply.

I can't make any promises, but I might take a look. Would you prefer having this feature always-on, or controllable somehow? In Azure, last access time tracking (and versionid) would be defined (and changeable) for each storage account.

Does Azurite already have a similar concept to build on?

maikschulze avatar Jan 27 '25 05:01 maikschulze

@maikschulze

Thanks for the detail question! Yes, Azurite is a storage data plane rest API emulator, not support control plane rest API which can enable last access time tracking (and versionid)... There are 2 ways to add the support:

  1. Add a new parameter to enable LAT
  2. Add a configure file for all storage control plane setting.

Option 2 might will be better, as other new feature with control plane setting can also utilize it.

blueww avatar Jan 27 '25 06:01 blueww