cayleygraph / cayleygraph/cayley
Updating an object leads to duplicate quads
- Dominant language
- Go
- Stars
- 15.1k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Here is an example of my code:
https://gist.github.com/denisvmedia/6897cf959bdb7aa5830f68884b03730a
**Description**
In my code I need to keep some object and then to be able to update one or more properties of that. It works, but it has an issue: the updated field leads to a duplicated quad.
**Steps to reproduce the issue:**
1. compile and run [this example.](https://gist.github.com/denisvmedia/6897cf959bdb7aa5830f68884b03730a)
**Received results:**
```
quads:
-- ->
-- -> "Cluster1"
-- ->
-- -> "Host1"
-- ->
-- -> "ok"
-- -> "error"
```
(note that ` -- ` is repeated two times with the original and the update values).
**Expected results:**
```
quads:
-- ->
-- -> "Cluster1"
-- ->
-- -> "Host1"
-- ->
-- -> "error"
```
**Cayley and DB backend versions:**
```
github.com/boltdb/bolt v1.3.1
github.com/cayleygraph/cayley v0.7.5
```
P.S. Well, I know, I can delete the quad manually, but is that a proper way?
Contributor guide
Research direction
Start by compiling and running the linked gist with Cayley v0.7.5 and the Bolt v1.3.1 backend, then inspect the update operation that produces the duplicate deploymentStatus quads. Compare the received and expected outputs; the work is done when updating the property removes the original value and leaves only the new quad.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100