From ba76c2ff39f390d03c861ee9f5c2fe02968aadf8 Mon Sep 17 00:00:00 2001 From: Patrick Dowler Date: Fri, 23 Feb 2024 13:43:14 -0800 Subject: [PATCH] update vault-quota/Design details --- vault-quota/Design.md | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/vault-quota/Design.md b/vault-quota/Design.md index e5ef4a6e..d6b167a9 100644 --- a/vault-quota/Design.md +++ b/vault-quota/Design.md @@ -134,17 +134,20 @@ Iterator iter = nodeDAO.containerIterator(false); // order not re ## database changes required note: all field and column names TBD -note: fields in Node classes probably not transient but TBD -* add `nbytes` and `delta` fields to ContainerNode -* add `nbytes` field to DataNode (no size props in LinkNode!) -* add `nbytes` to the `vospace.Node` table +* add `transient Long bytesUsed` to ContainerNode and DataNode +* add `transient long delta` field to ContainerNode +* add `bytesUsed` to the `vospace.Node` table * add `delta` to the `vospace.Node` table -* add `storageBucket` to DataNode +* add `storageBucket` to DataNode?? TBD * add `storageBucket` to `vospace.Node` table -## cadc-inventory-db API required -* incremental sync query/iterator: ArtifactDAO.iterator(Namespace ns, String uriBucketPrefix, Date minLastModified)? -* lookup DataNode by storageID: NodeDAO.getDataNode(URI storageID)? +## cadc-inventory-db API required immediately +* incremental sync query/iterator: ArtifactDAO.iterator(Namespace ns, String uriBucketPrefix, Date minLastModified, boolean ordered) + order by lastModified if set +* lookup DataNode by storageID: NodeDAO.getDataNode(URI storageID) +* indices to support new queries + +## cadc-inventory-db API required later * validate-by-bucket: use ArtifactDAO.iterator(String uriBucketPrefix, boolean ordered, Namespace ns) * validate-by-bucket: NodeDAO.dataNodeIterator(String storageBucketPrefix, boolean ordered) * incremental and validate containers: NodeDAO.containerIterator(boolean nonZeroDelta)