datacequia / go-dogg3rz

Decentralized Knowledge Orchestration Tool
Apache License 2.0
8 stars 1 forks source link

dogg3rz insert node doesn't update mtimes when new node is inserted #29

Closed adpadilla closed 3 years ago

adpadilla commented 3 years ago

The scenario is as follows:

  1. create a new dataset
  2. insert a node (into default graph)

The state of the json-ld doc are as follows for each step. Notice that the number of mtimes entries stay the same after the insert node operation.

after create dataset:

{
   "__dgrz_mtimes__" : {
      "9dcf97a184f32623d11a73124ceb99a5709b083721e878a16d78f596718ba7b2" : 1615752686707369000,
      "25dfd29c09617dcc9852281c030e5b3037a338a4712a42a21c907f259c6412a0" : 1615752686707369000
   },
   "@graph" : [],
   "@context" : {}
}

after insert node(default-graph):

{
   "@context" : {},
   "@graph" : [
      {
         "@id" : "_:b4879502-17b5-4418-80c0-3f7df44dbe52",
         "attr1" : "value1"
      }
   ],
   "__dgrz_mtimes__" : {
      "25dfd29c09617dcc9852281c030e5b3037a338a4712a42a21c907f259c6412a0" : 1615752686707369000,
      "9dcf97a184f32623d11a73124ceb99a5709b083721e878a16d78f596718ba7b2" : 1615752686707369000
   }
}
adpadilla commented 3 years ago

@bhallamp I see see the same issue where only 2 entries are in __dgrz_mtimes__ after inserting a node. Expect 3.

bhallamp commented 3 years ago

fixed: pbhallam@xxx ds1 % cat .document.jsonld | jq { "@context": {}, "@graph": [], "dgrz_mtimes_": { "25dfd29c09617dcc9852281c030e5b3037a338a4712a42a21c907f259c6412a0": 1627798111624102000, "9dcf97a184f32623d11a73124ceb99a5709b083721e878a16d78f596718ba7b2": 1627798111624102000 } } pbhallam@xxx ds1 % cat .document.jsonld | jq { "@context": {}, "@graph": [ { "@id": ":9aa7a260-a542-4390-b357-35babad46d79", "attr1": "val1" } ], "dgrz_mtimes__": { "25dfd29c09617dcc9852281c030e5b3037a338a4712a42a21c907f259c6412a0": 1627798111624102000, "50fc7b7a344d63b245bb09ee843a2b88728ff178731e449105d3b3c42f092ee3": 1627798305049942000, "9dcf97a184f32623d11a73124ceb99a5709b083721e878a16d78f596718ba7b2": 1627798111624102000 } }

adpadilla commented 3 years ago

verified as fixed