susano0 opened a new issue, #338:
URL: https://github.com/apache/age/issues/338
Every time a new label is created (by executing `Oid create_label(args)` in
"label_commands.c"), a sequence name (referred to as `seq_name`) is generated,
but it is not later stored in the table ag_catalog.ag_label (by calling `Oid
insert_label(args)`) making it inaccessible. To retrieve the sequence counter,
the sequence name or sequence id is necessary. Since the value returned by the
sequence counter is utilized to generate unique object ids, we are unable to
internally create new vertices or edges without access to the sequence counter.
Though we can add new edges and vertices without a sequence counter, doing
so would be incorrect. For instance, let's internally create a new vertex with
entry_id=1 (entry id is used to generate unique ids; the syntax is: `graphid
make graphid(const int32 label_id, const int64 entry_id);`). As the sequence
counter is also initially set to 1, it will produce the same object id as
before ('entry id = nextval(seq name)') if a user wishes to build a new vertex
with the create cypher command. Therefore, having two vertices with identical
ids would lead to a significant bug.
I propose storing the sequence name and id in the ag catalog.ag_label and
ag_cache. It would be useful for agload and graph generation tasks where we
must internally build vertices and edges.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]