Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #23 - replaced linux specific code with posix code #45

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions as/src/query/query.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,11 @@ get_query_range(const as_transaction* tr, as_namespace* ns,
return true;
}

if (ns->single_bin) {
cf_warning(AS_QUERY, "si-queries not supported - single-bin namespace");
return false;
}

const as_msg_field* f = as_msg_field_get(&tr->msgp->msg,
AS_MSG_FIELD_TYPE_INDEX_RANGE);
const uint8_t* data = f->data;
Expand Down Expand Up @@ -1723,11 +1728,6 @@ static bool
basic_query_get_bin_ids(const as_transaction* tr, as_namespace* ns,
cf_vector** bin_ids)
{
if (! as_transaction_has_where_clause(tr) && ns->single_bin) {
cf_warning(AS_QUERY, "can't select bins - single-bin namespace");
return false;
}

bool has_binlist = as_transaction_has_query_binlist(tr);
const as_msg* m = &tr->msgp->msg;
bool has_ops = m->n_ops > 0;
Expand All @@ -1740,6 +1740,12 @@ basic_query_get_bin_ids(const as_transaction* tr, as_namespace* ns,
if (! has_binlist && ! has_ops) {
return true;
}
// else - bin selection requested.

if (ns->single_bin) {
cf_warning(AS_QUERY, "can't select bins - single-bin namespace");
return false;
}

// TODO - temporary - won't need bin-list support after January 2023.
if (has_binlist) {
Expand Down
2 changes: 1 addition & 1 deletion cf/src/arenax_ce.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* arenax_ce.c
*
* Copyright (C) 2014-2020 Aerospike, Inc.
* Copyright (C) 2014-2022 Aerospike, Inc.
*
* Portions may be licensed to Aerospike, Inc. under one or more contributor
* license agreements.
Expand Down
2 changes: 1 addition & 1 deletion cf/src/cf_mutex.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

#include <cf_mutex.h>

#include <linux/futex.h>
#include <sys/futex.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cf_mutex.c:30:10: fatal error: sys/futex.h: No such file or directory
   30 | #include <sys/futex.h>
      |          ^~~~~~~~~~~~~
cat /etc/*issue
Ubuntu 20.04.5 LTS \n \l

#include <stdbool.h>
#include <stdio.h>
#include <stdint.h>
Expand Down