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

Getting Segmentation fault on aerospike.client.scan.foreach() after select() #224

Open
sandeepannathpayu opened this issue Jul 30, 2018 · 1 comment

Comments

@sandeepannathpayu
Copy link

sandeepannathpayu commented Jul 30, 2018

I have the following code, which is running fine for one aerospike set but throwing following error for

import aerospike
import sys,traceback
import redis
import time
import json
import sys

def process_result((key, metadata, record)):
    try:
        print "key" //This is printing for working set
        //Removed all other logic from here. 
    except:
        print("Got errors in processing " + key[2])


columnNames = {0:'PK',1:'merchantInKey'}

client = aerospike.client(config).connect()
scan = client.scan('namespace', 'setname')
#print type(columnNames)
scan.select(**columnNames) 
scan.foreach(process_result)

Error -

Segmentation fault (core dumped)

Specifying fields like following, instead of **columnNames in the above example works -

scan.select('PK','merchantInKey')

Stackoverflow link https://stackoverflow.com/questions/51599240/getting-segmentation-fault-on-aerospike-client-scan-foreach-after-select

@aerospikerobertmarks
Copy link
Contributor

aerospikerobertmarks commented Jul 30, 2018

Hi,

Could you share the versions of Python and the Aerospike Python client you are using? Also if you have the backtrace from the core dump, that would be useful.

scan.select is expecting a variable number of string arguments, and not a set of keyword arguments, so specifying them as scan.select('PK', 'merchantInKey') is the way to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants