Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
{
"stages": [
{
"$cursor": {
"query": {
"meta.eventHash": "zQmRHbBt6XXaUNotrtZBTU6qk1MnW4eFAeZKrWtFHrMY6CF"
},
"fields": {
"_parents.event.parentHash": 1,
"_parents.meta.eventHash": 1,
"meta.eventHash": 1,
"_id": 0
},
"queryPlanner": {
"plannerVersion": 1,
"namespace": "bedrock_ledger_c_c_storage_test.eefa94c0-86dd-4f41-93c9-16241eb0c18a-event",
"indexFilterSet": false,
"parsedQuery": {
"meta.eventHash": {
"$eq": "zQmRHbBt6XXaUNotrtZBTU6qk1MnW4eFAeZKrWtFHrMY6CF"
}
},
"winningPlan": {
"stage": "FETCH",
"inputStage": {
"stage": "IXSCAN",
"keyPattern": {
"meta.eventHash": 1,
"meta.consensus": 1
},
"indexName": "event.eventHash.core.3",
"isMultiKey": false,
"multiKeyPaths": {
"meta.eventHash": [],
"meta.consensus": []
},
"isUnique": true,
"isSparse": false,
"isPartial": false,
"indexVersion": 2,
"direction": "forward",
"indexBounds": {
"meta.eventHash": [
"[\"zQmRHbBt6XXaUNotrtZBTU6qk1MnW4eFAeZKrWtFHrMY6CF\", \"zQmRHbBt6XXaUNotrtZBTU6qk1MnW4eFAeZKrWtFHrMY6CF\"]"
],
"meta.consensus": [
"[MinKey, MaxKey]"
]
}
}
},
"rejectedPlans": [
{
"stage": "FETCH",
"inputStage": {
"stage": "IXSCAN",
"keyPattern": {
"meta.eventHash": 1,
"event.parentHash": 1
},
"indexName": "event.continuity2017.aggregateHistory",
"isMultiKey": true,
"multiKeyPaths": {
"meta.eventHash": [],
"event.parentHash": [
"event.parentHash"
]
},
"isUnique": true,
"isSparse": false,
"isPartial": false,
"indexVersion": 2,
"direction": "forward",
"indexBounds": {
"meta.eventHash": [
"[\"zQmRHbBt6XXaUNotrtZBTU6qk1MnW4eFAeZKrWtFHrMY6CF\", \"zQmRHbBt6XXaUNotrtZBTU6qk1MnW4eFAeZKrWtFHrMY6CF\"]"
],
"event.parentHash": [
"[MinKey, MaxKey]"
]
}
}
},
{
"stage": "FETCH",
"inputStage": {
"stage": "IXSCAN",
"keyPattern": {
"meta.eventHash": 1
},
"indexName": "event.eventHash.core.1",
"isMultiKey": false,
"multiKeyPaths": {
"meta.eventHash": []
},
"isUnique": true,
"isSparse": false,
"isPartial": false,
"indexVersion": 2,
"direction": "forward",
"indexBounds": {
"meta.eventHash": [
"[\"zQmRHbBt6XXaUNotrtZBTU6qk1MnW4eFAeZKrWtFHrMY6CF\", \"zQmRHbBt6XXaUNotrtZBTU6qk1MnW4eFAeZKrWtFHrMY6CF\"]"
]
}
}
}
]
}
}
},
{
"$graphLookup": {
"from": "eefa94c0-86dd-4f41-93c9-16241eb0c18a-event",
"as": "_parents",
"connectToField": "meta.eventHash",
"connectFromField": "event.parentHash",
"startWith": "$meta.eventHash",
"restrictSearchWithMatch": {
"$nor": [
{
"meta.continuity2017.type": "m",
"meta.continuity2017.creator": "https://bedrock.localhost:18443/consensus/continuity2017/voters/z6MksAQApsjtHtPRC7npdG9PSfqU3fbpw3gvrLkXG3HnUkhK",
"meta.continuity2017.generation": {
"$lte": 0
}
}
]
}
}
},
{
"$project": {
"_id": false,
"_parents": {
"meta": {
"eventHash": true
},
"event": {
"parentHash": true
}
}
}
},
{
"$unwind": {
"path": "$_parents"
}
},
{
"$replaceRoot": {
"newRoot": "$_parents"
}
}
],
"ok": 1
}
[
{
"stages": [
{
"$cursor": {
"query": {
"meta.eventHash": "zQmW2QrU3j6ch4ZB4ueX91SMdi3h47VXb1UffqjnnUMMQvx"
},
"fields": {
"_parents.event.parentHash": 1,
"_parents.meta.eventHash": 1,
"meta.eventHash": 1,
"_id": 0
},
"queryPlanner": {
"plannerVersion": 1,
"namespace": "bedrock_ledger_c_c_storage_test.4bb3597d-2049-409c-94ca-88e7b6fc92cd-event",
"indexFilterSet": false,
"parsedQuery": {
"meta.eventHash": {
"$eq": "zQmW2QrU3j6ch4ZB4ueX91SMdi3h47VXb1UffqjnnUMMQvx"
}
},
"winningPlan": {
"stage": "FETCH",
"inputStage": {
"stage": "IXSCAN",
"keyPattern": {
"meta.eventHash": 1,
"meta.consensus": 1
},
"indexName": "event.eventHash.core.3",
"isMultiKey": false,
"multiKeyPaths": {
"meta.eventHash": [],
"meta.consensus": []
},
"isUnique": true,
"isSparse": false,
"isPartial": false,
"indexVersion": 2,
"direction": "forward",
"indexBounds": {
"meta.eventHash": [
"[\"zQmW2QrU3j6ch4ZB4ueX91SMdi3h47VXb1UffqjnnUMMQvx\", \"zQmW2QrU3j6ch4ZB4ueX91SMdi3h47VXb1UffqjnnUMMQvx\"]"
],
"meta.consensus": [
"[MinKey, MaxKey]"
]
}
}
},
"rejectedPlans": [
{
"stage": "FETCH",
"inputStage": {
"stage": "IXSCAN",
"keyPattern": {
"meta.eventHash": 1,
"event.parentHash": 1
},
"indexName": "event.continuity2017.aggregateHistory",
"isMultiKey": true,
"multiKeyPaths": {
"meta.eventHash": [],
"event.parentHash": [
"event.parentHash"
]
},
"isUnique": true,
"isSparse": false,
"isPartial": false,
"indexVersion": 2,
"direction": "forward",
"indexBounds": {
"meta.eventHash": [
"[\"zQmW2QrU3j6ch4ZB4ueX91SMdi3h47VXb1UffqjnnUMMQvx\", \"zQmW2QrU3j6ch4ZB4ueX91SMdi3h47VXb1UffqjnnUMMQvx\"]"
],
"event.parentHash": [
"[MinKey, MaxKey]"
]
}
}
},
{
"stage": "FETCH",
"inputStage": {
"stage": "IXSCAN",
"keyPattern": {
"meta.eventHash": 1
},
"indexName": "event.eventHash.core.1",
"isMultiKey": false,
"multiKeyPaths": {
"meta.eventHash": []
},
"isUnique": true,
"isSparse": false,
"isPartial": false,
"indexVersion": 2,
"direction": "forward",
"indexBounds": {
"meta.eventHash": [
"[\"zQmW2QrU3j6ch4ZB4ueX91SMdi3h47VXb1UffqjnnUMMQvx\", \"zQmW2QrU3j6ch4ZB4ueX91SMdi3h47VXb1UffqjnnUMMQvx\"]"
]
}
}
}
]
}
}
},
{
"$graphLookup": {
"from": "4bb3597d-2049-409c-94ca-88e7b6fc92cd-event",
"as": "_parents",
"connectToField": "meta.eventHash",
"connectFromField": "event.parentHash",
"startWith": "$meta.eventHash",
"restrictSearchWithMatch": {
"$nor": [
{
"meta.continuity2017.type": "m",
"meta.continuity2017.creator": "https://bedrock.localhost:18443/consensus/continuity2017/voters/z6MkkTtByJ2HMxs3r1deuzeEMuU9Zsb9tfqYRaZSgNztESxv",
"meta.continuity2017.generation": {
"$lte": 0
}
}
]
}
}
},
{
"$project": {
"_id": false,
"_parents": {
"meta": {
"eventHash": true
},
"event": {
"parentHash": true
}
}
}
},
{
"$unwind": {
"path": "$_parents"
}
},
{
"$replaceRoot": {
"newRoot": "$_parents"
}
}
],
"ok": 1
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment