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

indexer: read error 'Undefined error: 0' #281

Closed
soul-rise opened this issue Nov 28, 2019 · 8 comments
Closed

indexer: read error 'Undefined error: 0' #281

soul-rise opened this issue Nov 28, 2019 · 8 comments
Labels
bug

Comments

@soul-rise
Copy link

@soul-rise soul-rise commented Nov 28, 2019

Manticore Search version:

Manticore 3.2.0 e526a01@191017 release

OS version:

macOs 10.15 (19A603)

Build version:

manticore-3.2.0-191017-e526a014-release-osx10.14.6-x86_64-bin

Steps to reproduce:

1.txt

txt -> csv

test.txt

txt -> conf

run

./indexer --config configs/test.conf --verbose disk_delta_leads_srv8_0_index disk_delta_leads_srv8_index

Messsages from log files:

Manticore 3.2.0 e526a01@191017 release

Copyright (c) 2001-2016, Andrew Aksyonoff

Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)

Copyright (c) 2017-2019, Manticore Software LTD (http://manticoresearch.com)

using config file 'configs/test.conf'...

indexing index 'disk_delta_leads_srv8_0_index'...

collected 1 docs, 0.0 MB

creating lookup: 0.0 Kdocs, 100.0% done

creating histograms: 0.0 Kdocs, 100.0% done

sorted 0.0 Mhits, 100.0% done

total 1 docs, 21 bytes

total 1.029 sec, 20 bytes/sec, 0.97 docs/sec

indexing index 'disk_delta_leads_srv8_index'...

ERROR: index 'disk_delta_leads_srv8_index': source 'disk_delta_leads_srv8': read error 'Undefined error: 0'.

total 0 docs, 0 bytes

total 0.000 sec, 0 bytes/sec, 0.00 docs/sec

total 4 reads, 0.000 sec, 8.0 kb/call avg, 0.0 msec/call avg

total 15 writes, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg

@adriannuta

This comment has been minimized.

Copy link
Contributor

@adriannuta adriannuta commented Nov 28, 2019

Can't reproduce with the data provided. From the config posted, same csv file is used.

@soul-rise

This comment has been minimized.

Copy link
Author

@soul-rise soul-rise commented Nov 28, 2019

for ease of reproduce 1 file, is this a mistake?
What information can I provide for reproduction?

if run
./indexer --config configs/test.conf --verbose disk_delta_leads_srv8_0_index disk_delta_leads_srv8_index
ERROR: index 'disk_delta_leads_srv8_index': source 'disk_delta_leads_srv8': read error 'Undefined error: 0'.

if reorder index
./indexer --config configs/test.conf --verbose disk_delta_leads_srv8_index disk_delta_leads_srv8_0_index
ERROR: index 'disk_delta_leads_srv8_0_index': source 'disk_delta_leads_srv8_0': read error 'Undefined error: 0'.

if add --rotate
./indexer --config configs/test.conf disk_delta_leads_srv8_index disk_delta_leads_srv8_0_index --rotate

ERROR: index 'disk_delta_leads_srv8_0_index': source 'disk_delta_leads_srv8_0': read error 'No such file or directory'.

./indexer --config configs/test.conf disk_delta_leads_srv8_index
OK

./indexer --config configs/test.conf disk_delta_leads_srv8_0_index
OK

@tomatolog

This comment has been minimized.

Copy link
Contributor

@tomatolog tomatolog commented Nov 28, 2019

i also use you config and csv files you provided and got such output

indexer --config test.txt --verbose disk_delta_leads_srv8_0_index disk_delta_leads_srv8_index
Manticore 3.2.1 fa5f8787@191128 dev
using config file 'test.txt'...
indexing index 'disk_delta_leads_srv8_0_index'...
collected 1 docs, 0.0 MB
creating lookup: 0.0 Kdocs, 100.0% done
creating histograms: 0.0 Kdocs, 100.0% done
sorted 0.0 Mhits, 100.0% done
total 1 docs, 21 bytes
total 1.028 sec, 20 bytes/sec, 0.97 docs/sec
indexing index 'disk_delta_leads_srv8_index'...
collected 1 docs, 0.0 MB
creating lookup: 0.0 Kdocs, 100.0% done
creating histograms: 0.0 Kdocs, 100.0% done
sorted 0.0 Mhits, 100.0% done
total 1 docs, 21 bytes
total 1.086 sec, 19 bytes/sec, 0.92 docs/sec
total 8 reads, 0.000 sec, 8.0 kb/call avg, 0.0 msec/call avg
total 30 writes, 0.003 sec, 0.0 kb/call avg, 0.1 msec/call avg

see no issues here. I can not reproduce issue you posted too.

@tomatolog

This comment has been minimized.

Copy link
Contributor

@tomatolog tomatolog commented Nov 28, 2019

could you provide complete example that reproduces issue? maybe docker container or VM snapshot?

@manticoresearch

This comment has been minimized.

Copy link
Contributor

@manticoresearch manticoresearch commented Nov 29, 2019

I could reproduce the issue. Here's the minified config and the test case:

Config:

➜  gh_281 cat test.conf
source csv {
    type = csvpipe
    csvpipe_command = echo "1,2,3,'abc'"
    csvpipe_attr_uint = a
    csvpipe_attr_uint = b
    csvpipe_field = f
}

index idx1 {
   source = csv
   path = idx1
}

index idx2 {
   source = csv
   path = idx2
}

searchd
{
    listen              = 9313:mysql41
    pid_file            = searchd_9313.pid
}

2nd index fails to build:

➜  gh_281 indexer -c test.conf --verbose idx2 idx1
Manticore 3.2.0 e526a01@191017 release
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-2019, Manticore Software LTD (http://manticoresearch.com)

using config file 'test.conf'...
indexing index 'idx2'...
collected 1 docs, 0.0 MB
creating lookup: 0.0 Kdocs, 100.0% done
creating histograms: 0.0 Kdocs, 100.0% done
sorted 0.0 Mhits, 100.0% done
total 1 docs, 5 bytes
total 0.111 sec, 45 bytes/sec, 9.00 docs/sec
indexing index 'idx1'...
ERROR: index 'idx1': source 'csv': read error 'Undefined error: 0'.
total 0 docs, 0 bytes
total 0.000 sec, 0 bytes/sec, 0.00 docs/sec
total 4 reads, 0.000 sec, 8.0 kb/call avg, 0.0 msec/call avg
total 13 writes, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg

➜  gh_281 indexer -c test.conf --verbose idx1 idx2
Manticore 3.2.0 e526a01@191017 release
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-2019, Manticore Software LTD (http://manticoresearch.com)

using config file 'test.conf'...
indexing index 'idx1'...
collected 1 docs, 0.0 MB
creating lookup: 0.0 Kdocs, 100.0% done
creating histograms: 0.0 Kdocs, 100.0% done
sorted 0.0 Mhits, 100.0% done
total 1 docs, 5 bytes
total 0.272 sec, 18 bytes/sec, 3.66 docs/sec
indexing index 'idx2'...
ERROR: index 'idx2': source 'csv': read error 'Undefined error: 0'.
total 0 docs, 0 bytes
total 0.000 sec, 0 bytes/sec, 0.00 docs/sec
total 4 reads, 0.000 sec, 8.0 kb/call avg, 0.0 msec/call avg
total 13 writes, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg

When run separately all is fine:

➜  gh_281 indexer -c test.conf --verbose idx1
Manticore 3.2.0 e526a01@191017 release
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-2019, Manticore Software LTD (http://manticoresearch.com)

using config file 'test.conf'...
indexing index 'idx1'...
collected 1 docs, 0.0 MB
creating lookup: 0.0 Kdocs, 100.0% done
creating histograms: 0.0 Kdocs, 100.0% done
sorted 0.0 Mhits, 100.0% done
total 1 docs, 5 bytes
total 0.111 sec, 44 bytes/sec, 8.96 docs/sec
total 4 reads, 0.000 sec, 8.0 kb/call avg, 0.0 msec/call avg
total 13 writes, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
➜  gh_281 indexer -c test.conf --verbose idx2
Manticore 3.2.0 e526a01@191017 release
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-2019, Manticore Software LTD (http://manticoresearch.com)

using config file 'test.conf'...
indexing index 'idx2'...
collected 1 docs, 0.0 MB
creating lookup: 0.0 Kdocs, 100.0% done
creating histograms: 0.0 Kdocs, 100.0% done
sorted 0.0 Mhits, 100.0% done
total 1 docs, 5 bytes
total 0.122 sec, 40 bytes/sec, 8.13 docs/sec
total 4 reads, 0.000 sec, 8.0 kb/call avg, 0.0 msec/call avg
total 13 writes, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg

Also fails in --rotate mode, but the error is different:

➜  gh_281 indexer -c test.conf --verbose idx1 idx2 --rotate
Manticore 3.2.0 e526a01@191017 release
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-2019, Manticore Software LTD (http://manticoresearch.com)

using config file 'test.conf'...
indexing index 'idx1'...
collected 1 docs, 0.0 MB
creating lookup: 0.0 Kdocs, 100.0% done
creating histograms: 0.0 Kdocs, 100.0% done
sorted 0.0 Mhits, 100.0% done
total 1 docs, 5 bytes
total 0.116 sec, 43 bytes/sec, 8.61 docs/sec
indexing index 'idx2'...
ERROR: index 'idx2': source 'csv': read error 'No such file or directory'.
total 0 docs, 0 bytes
total 0.000 sec, 0 bytes/sec, 0.00 docs/sec
total 4 reads, 0.000 sec, 8.0 kb/call avg, 0.0 msec/call avg
total 13 writes, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
@githubmanticore githubmanticore added the bug label Nov 29, 2019
@manticoresearch

This comment has been minimized.

Copy link
Contributor

@manticoresearch manticoresearch commented Nov 29, 2019

Tried in Linux - all is good. Looks like it can be reproduced only in MacOS.

@githubmanticore

This comment has been minimized.

Copy link
Contributor

@githubmanticore githubmanticore commented Dec 2, 2019

➤ Sergey Nikolaev commented:

@klirichek pls check if you can reproduce the issue

@manticoresearch

This comment has been minimized.

Copy link
Contributor

@manticoresearch manticoresearch commented Dec 6, 2019

fixed in ce2e4b4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.