Skip to content

Commit 515fdbc

Browse files
author
Zoran Cvetkov
committed
better debug print
1 parent 166c909 commit 515fdbc

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

graph/src/components/store/entity_cache.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,13 @@ impl EntityCache {
374374
let mut entity = entity;
375375
let old_vid = entity.set_vid(vid).expect("the vid should be set");
376376
// Make sure that there was no VID previously set for this entity.
377-
if old_vid.is_some() {
378-
bail!("VID was already present when set in EntityCache");
377+
if let Some(ovid) = old_vid {
378+
bail!(
379+
"VID: {} of entity: {} with ID: {} was already present when set in EntityCache",
380+
ovid,
381+
key.entity_type,
382+
entity.id()
383+
);
379384
}
380385

381386
self.entity_op(key.clone(), EntityOp::Update(entity));

graph/src/data/subgraph/api_version.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ pub const SPEC_VERSION_1_2_0: Version = Version::new(1, 2, 0);
5656

5757
// Enables subgraphs as datasource.
5858
// Changes the way the VID field is generated. It used to be autoincrement. Now its
59-
// based on block number and the order of the entities in a block. The later is
60-
// representing the writting order of all entity types in a subgraph.
59+
// based on block number and the order of the entities in a block. The latter
60+
// represents the write order across all entity types in the subgraph.
6161
pub const SPEC_VERSION_1_3_0: Version = Version::new(1, 3, 0);
6262

6363
// The latest spec version available

0 commit comments

Comments
 (0)