Skip to content

Commit

Permalink
Merge branch 'main' into parallel-load
Browse files Browse the repository at this point in the history
  • Loading branch information
liulx20 committed Feb 28, 2024
2 parents e787c4e + c334533 commit e0445c5
Show file tree
Hide file tree
Showing 22 changed files with 163 additions and 74 deletions.
89 changes: 89 additions & 0 deletions .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: 'Check stale issues and pull requests'

on:
schedule:
- cron: '0 0 12 * *'
workflow_dispatch:

env:
DEFAULT_ASSIGNEE: yecol sighingnow
DAYS_BEFORE_ISSUE_CLOSE: -1
DAYS_BEFORE_PR_CLOSE: -1
DAYS_BEFORE_ISSUE_STALE: 7
DAYS_BEFORE_PR_STALE: 14

jobs:
stale:
permissions:
issues: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
# install jq
sudo apt-get update
sudo apt-get install -y jq
# install gh cli
type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y)
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
&& sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& sudo apt update \
&& sudo apt install gh -y
- uses: actions/stale@v9
id: stale
with:
days-before-issue-close: ${{ env.DAYS_BEFORE_ISSUE_CLOSE }}
days-before-pr-close: ${{ env.DAYS_BEFORE_PR_CLOSE }}
days-before-issue-stale: ${{ env.DAYS_BEFORE_ISSUE_STALE }}
days-before-pr-stale: ${{ env.DAYS_BEFORE_PR_STALE }}
stale-issue-label: stale
stale-pr-label: stale
exempt-pr-labels: work-in-progress,requires-further-info,requires-further-discussion
exempt-issue-labels: work-in-progress,requires-further-info,requires-further-discussion,wontfix,newcomers
labels-to-remove-when-unstale: stale,requires-further-info,requires-further-discussion
exempt-draft-pr: true

- name: Notify assignees
env:
REPO: ${{ github.repository }}
STALED: ${{ steps.stale.outputs.staled-issues-prs }}
GH_TOKEN: ${{ github.token }}
run: |
for N in $(echo "$STALED" | jq -r ".[].number");
do
assignees=$(echo $(gh issue view $N -R $REPO --json assignees) | jq -r ".assignees[].login")
echo "Processing stale issue/pr $N, assignees: $assignees"
message=""
if [ -z "$assignees" ]; then
message="/cc"
for assignee in $DEFAULT_ASSIGNEE; do
message="$message @$assignee"
done
message="$message, this issus/pr has had no activity for a long time, please help to review the status and assign people to work on it."
else
message="/cc"
for assignee in $assignees; do
message="$message @$assignee"
done
message="$message, this issus/pr has had no activity for for a long time, could you folks help to review the status ? \n"
message="$message To suppress further notifications,\n"
message="$message - for issues, \n"
message="$message - if it is waiting for further response from the reporter/author, please help to add the label \`requires-further-info\`, \n"
message="$message - if you have already started working on it, please add the label \`work-in-progress\` to the issue, \n"
message="$message - if this issue requires further designing discussion and not in current plan, or won't be fixed, please add the label \`requires-further-discussion\` or \`wontfix\` to the issue, \n"
message="$message - for pull requests, \n"
message="$message - if you are still working on it and it is not ready for reviewing, please convert this pull request as draft PR, \n"
message="$message - if you have decided to hold this development on, please add the \`requires-further-discussion\` label to the pull request. \n"
message="$message Thanks!"
fi
echo -e "$message" > message-$N
message_content=$(cat message-$N)
echo "Commenting on stale issue/pr $N, assignees: $assignees, message: $message_content"
gh issue comment $N -R $REPO -b "$message_content"
done
6 changes: 3 additions & 3 deletions flex/engines/graph_db/app/hqps_app.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

namespace gs {

void put_argment(gs::Encoder& encoder, const query::Argument& argment) {
auto& value = argment.value();
void put_argument(gs::Encoder& encoder, const query::Argument& argument) {
auto& value = argument.value();
auto item_case = value.item_case();
switch (item_case) {
case common::Value::kI32:
Expand Down Expand Up @@ -85,7 +85,7 @@ bool HQPSProcedureApp::Query(Decoder& input, Encoder& output) {
gs::Encoder input_encoder(input_buffer);
auto& args = cur_query.arguments();
for (int32_t i = 0; i < args.size(); ++i) {
put_argment(input_encoder, args[i]);
put_argument(input_encoder, args[i]);
}
VLOG(10) << "Query name: " << query_name << ", args: " << input_buffer.size()
<< " bytes";
Expand Down
2 changes: 1 addition & 1 deletion flex/engines/graph_db/database/graph_db.cc
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ Result<bool> GraphDB::Open(const GraphDBConfig& config) {
graph_.Warmup(thread_num_);
}

if (config.enable_monitering) {
if (config.enable_monitoring) {
if (monitor_thread_running_) {
monitor_thread_running_ = false;
monitor_thread_.join();
Expand Down
6 changes: 3 additions & 3 deletions flex/engines/graph_db/database/graph_db.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,21 @@ struct GraphDBConfig {
data_dir(data_dir_),
thread_num(thread_num_),
warmup(false),
enable_monitering(false),
enable_monitoring(false),
enable_auto_compaction(false),
memory_level(1) {}

Schema schema;
std::string data_dir;
int thread_num;
bool warmup;
bool enable_monitering;
bool enable_monitoring;
bool enable_auto_compaction;

/*
0 - sync with disk;
1 - mmap virtual memory;
2 - prefering hugepages;
2 - preferring hugepages;
3 - force hugepages;
*/
int memory_level;
Expand Down
12 changes: 6 additions & 6 deletions flex/engines/graph_db/database/read_transaction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,15 @@ Any ReadTransaction::GetVertexId(label_t label, vid_t index) const {
}

ReadTransaction::edge_iterator ReadTransaction::GetOutEdgeIterator(
label_t label, vid_t u, label_t neighnor_label, label_t edge_label) const {
return {neighnor_label, edge_label,
graph_.get_outgoing_edges(label, u, neighnor_label, edge_label)};
label_t label, vid_t u, label_t neighbor_label, label_t edge_label) const {
return {neighbor_label, edge_label,
graph_.get_outgoing_edges(label, u, neighbor_label, edge_label)};
}

ReadTransaction::edge_iterator ReadTransaction::GetInEdgeIterator(
label_t label, vid_t u, label_t neighnor_label, label_t edge_label) const {
return {neighnor_label, edge_label,
graph_.get_incoming_edges(label, u, neighnor_label, edge_label)};
label_t label, vid_t u, label_t neighbor_label, label_t edge_label) const {
return {neighbor_label, edge_label,
graph_.get_incoming_edges(label, u, neighbor_label, edge_label)};
}

const Schema& ReadTransaction::schema() const { return graph_.schema(); }
Expand Down
4 changes: 2 additions & 2 deletions flex/engines/graph_db/database/read_transaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -345,11 +345,11 @@ class ReadTransaction {
Any GetVertexId(label_t label, vid_t index) const;

edge_iterator GetOutEdgeIterator(label_t label, vid_t u,
label_t neighnor_label,
label_t neighbor_label,
label_t edge_label) const;

edge_iterator GetInEdgeIterator(label_t label, vid_t u,
label_t neighnor_label,
label_t neighbor_label,
label_t edge_label) const;

template <typename EDATA_T>
Expand Down
16 changes: 8 additions & 8 deletions flex/engines/graph_db/database/update_transaction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,8 @@ UpdateTransaction::vertex_iterator UpdateTransaction::GetVertexIterator(
}

UpdateTransaction::edge_iterator UpdateTransaction::GetOutEdgeIterator(
label_t label, vid_t u, label_t neighnor_label, label_t edge_label) {
size_t csr_index = get_out_csr_index(label, neighnor_label, edge_label);
label_t label, vid_t u, label_t neighbor_label, label_t edge_label) {
size_t csr_index = get_out_csr_index(label, neighbor_label, edge_label);
const vid_t* begin = nullptr;
const vid_t* end = nullptr;
auto iter = added_edges_[csr_index].find(u);
Expand All @@ -355,17 +355,17 @@ UpdateTransaction::edge_iterator UpdateTransaction::GetOutEdgeIterator(
return {true,
label,
u,
neighnor_label,
neighbor_label,
edge_label,
begin,
end,
graph_.get_outgoing_edges(label, u, neighnor_label, edge_label),
graph_.get_outgoing_edges(label, u, neighbor_label, edge_label),
this};
}

UpdateTransaction::edge_iterator UpdateTransaction::GetInEdgeIterator(
label_t label, vid_t u, label_t neighnor_label, label_t edge_label) {
size_t csr_index = get_in_csr_index(label, neighnor_label, edge_label);
label_t label, vid_t u, label_t neighbor_label, label_t edge_label) {
size_t csr_index = get_in_csr_index(label, neighbor_label, edge_label);
const vid_t* begin = nullptr;
const vid_t* end = nullptr;
auto iter = added_edges_[csr_index].find(u);
Expand All @@ -376,11 +376,11 @@ UpdateTransaction::edge_iterator UpdateTransaction::GetInEdgeIterator(
return {false,
label,
u,
neighnor_label,
neighbor_label,
edge_label,
begin,
end,
graph_.get_incoming_edges(label, u, neighnor_label, edge_label),
graph_.get_incoming_edges(label, u, neighbor_label, edge_label),
this};
}

Expand Down
4 changes: 2 additions & 2 deletions flex/engines/graph_db/database/update_transaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ class UpdateTransaction {
vertex_iterator GetVertexIterator(label_t label);

edge_iterator GetOutEdgeIterator(label_t label, vid_t u,
label_t neighnor_label, label_t edge_label);
label_t neighbor_label, label_t edge_label);

edge_iterator GetInEdgeIterator(label_t label, vid_t u,
label_t neighnor_label, label_t edge_label);
label_t neighbor_label, label_t edge_label);

Any GetVertexField(label_t label, vid_t lid, int col_id) const;

Expand Down
2 changes: 1 addition & 1 deletion flex/engines/graph_db/grin/test/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ void test_topology_adjacent_list(const char* uri_str, GRIN_DIRECTION dir) {
acnt++;
grin_get_next_adjacent_list_iter(g, ali);
}
#ifdef GRIN_ENABLE_ADJAECENT_LIST_ARRAY
#ifdef GRIN_ENABLE_ADJACENT_LIST_ARRAY
assert(acnt == grin_get_adjacent_list_size(g, al));
#endif
grin_destroy_adjacent_list_iter(g, ali);
Expand Down
12 changes: 6 additions & 6 deletions flex/engines/hqps_db/core/base_engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ class BaseEngine {
boost::hash<ctx_y_ele_t>>
y_ele_to_ind;
{
// fillin ele_to_ind
// fill in ele_to_ind
for (auto iter : ctx_y) {
auto ele = iter.GetAllElement();
auto index_ele = iter.GetAllIndexElement();
Expand Down Expand Up @@ -355,7 +355,7 @@ class BaseEngine {
<< ", ctx y:" << ctx_y.GetHead().Size();
{
auto t0 = -grape::GetCurrentTime();
// fillin ele_to_ind
// fill in ele_to_ind
for (auto iter : ctx_y) {
auto ele = iter.GetAllElement();
auto index_ele = iter.GetAllIndexElement();
Expand All @@ -367,7 +367,7 @@ class BaseEngine {
remove_ith_jth_element<real_y_ind0, real_y_ind1>(data)));
}
t0 += grape::GetCurrentTime();
LOG(INFO) << "fillin ele_to_ind takes " << t0 << "s";
LOG(INFO) << "fill in ele_to_ind takes " << t0 << "s";
}

{
Expand Down Expand Up @@ -467,7 +467,7 @@ class BaseEngine {

template <size_t real_x_ind, size_t real_y_ind, typename... BuilderX,
typename... BuilderY>
static auto BuilderConcate(const std::tuple<BuilderX...>& x_builders,
static auto BuilderConcatenate(const std::tuple<BuilderX...>& x_builders,
const std::tuple<BuilderY...>& y_builders) {
auto remove_x_th_col = remove_nth_element<real_x_ind>(x_builders);
auto remove_y_th_col = remove_nth_element<real_y_ind>(y_builders);
Expand All @@ -486,9 +486,9 @@ class BaseEngine {
ctx_y) {
auto ctx_x_builder_tuple = ctx_x.CreateSetBuilder();
auto ctx_y_builder_tuple = ctx_y.CreateSetBuilder();
auto concated_builder_tuple = BuilderConcate<real_x_ind, real_y_ind>(
auto concatenated_builder_tuple = BuilderConcatenate<real_x_ind, real_y_ind>(
ctx_x_builder_tuple, ctx_y_builder_tuple);
return std::make_pair(concated_builder_tuple,
return std::make_pair(concatenated_builder_tuple,
std::get<real_x_ind>(ctx_x_builder_tuple));
}

Expand Down
6 changes: 3 additions & 3 deletions flex/engines/hqps_db/core/operator/edge_expand.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ struct EdgeExpandEState {

template <typename GRAPH_INTERFACE, typename VERTEX_SET_T, size_t num_labels,
typename EDGE_FILTER_T, typename... T>
struct EdgeExpandEMutltiDstState {
struct EdgeExpandEMultiDstState {
const GRAPH_INTERFACE& graph_;
VERTEX_SET_T& cur_vertex_set_;
Direction direction_;
Expand All @@ -96,7 +96,7 @@ struct EdgeExpandEMutltiDstState {
const EDGE_FILTER_T& edge_filter_;
size_t limit_;

EdgeExpandEMutltiDstState(
EdgeExpandEMultiDstState(
const GRAPH_INTERFACE& frag, VERTEX_SET_T& v_set, Direction direction,
typename GRAPH_INTERFACE::label_id_t edge_label,
std::array<typename GRAPH_INTERFACE::label_id_t, num_labels> other_label,
Expand Down Expand Up @@ -332,7 +332,7 @@ class EdgeExpand {
VLOG(10) << "edgeExpandV: from label: " << state.cur_vertex_set_.GetLabel()
<< ", other label: " << state.other_label_
<< ",edge label: " << state.edge_label_
<< ",dire: " << state.direction_ << ", propert name: ";
<< ",dire: " << state.direction_ << ", property name: ";
auto selectors = state.edge_filter_.selectors_;
auto adj_list_array =
get_adj_list_array_with_filter(state, src_label, dst_label, selectors);
Expand Down

0 comments on commit e0445c5

Please sign in to comment.