the-data-lab / GraphOne

"GraphOne: A Data Store for Real-time Analytics on Evolving Graphs", Usenix FAST'19
GNU General Public License v3.0
58 stars 31 forks source link

Cannot retrieve the non archived edges #3

Closed whatsthecraic closed 4 years ago

whatsthecraic commented 5 years ago

Hi there, while trying the library, I wasn't able to figure it out how to retrieve the edges inserted but not yet moved to the adjacency list. The paper states that, in the static view, by invoking get-nebrs-*(), it

returns the neighbor list of a vertex by combining the adjacency store and the nonarchived edges in a user supplied memory buffer.

While trying the above API, the library is able to return the degree correctly but not to fetch the non archived edges, see attached repro. Is there something else that needs to be enabled to use this API?

Thanks, Dean

repro.cpp.rename.txt

pradeep-k commented 5 years ago

get_nonarchived_edges() will return the non-archived edges in the edge list format.

In the current codebase, get_nebrs-*() may not return it now, do you want me to enable it? it will not take much time for me to do that. Kindly let me know.

whatsthecraic commented 5 years ago

Ah ok. For a fix, only if it's a bug. Otherwise I'll merge the two lists from the user side. Still does this require to iterate over the non archived list for each vertex, to check which edges have been inserted/deleted?

pradeep-k commented 5 years ago

It is a bug, that was never tested, and have work-around such as always pass stale as true in create_static_view(). And then for non-archived edges, call get_nonarchived_edges(), that will give you all the non-archived edges, and iterate over them one by one , and pick those edges are interest to you.

An example can be found in mem_bfs_simple() function in file https://github.com/pradeep-k/GraphOne/blob/master/gview/mem_iterative_analytics.h

          //#pragma omp parallel  <= if parallelism is desired
            vid_t src, dst;
            edgeT_t<T>* edges;
            index_t count = snaph->get_nonarchived_edges(edges);

            //#pragma omp for schedule (static)  <= if parallelism is desired
            for (index_t i = 0; i < count; ++i) {
                src = edges[i].src_id;
                dst = get_dst(edges+i);
                // do whatever you want 
            }

I will work over the bug during the weekends.

whatsthecraic commented 5 years ago

oky, thanks.

pradeep-k commented 4 years ago

simple, private and stale flag implementation is complete. The commit number is 088afe6

README will be updated shortly for their actual meanings.

pradeep-k commented 4 years ago

a42ff8e050115d58f9bce582f04ad92954c0fd14 updates the readme file.

pradeep-k commented 4 years ago

Closing the issue as it is fixed now. Feel free to file a new bug if you face any other issues.