Skip to content

Unclear error when memcached instance created without box initialization #76

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

Closed
ligurio opened this issue Dec 1, 2021 · 0 comments · Fixed by #100
Closed

Unclear error when memcached instance created without box initialization #76

ligurio opened this issue Dec 1, 2021 · 0 comments · Fixed by #100
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@ligurio
Copy link
Member

ligurio commented Dec 1, 2021

sergeyb@pony:~/sources/MRG/memcached$ /home/sergeyb/sources/MRG/tarantool/build/src/tarantool 
Tarantool 2.10.0-beta1-257-g14aa6a597
type 'help' for interactive help
tarantool> mc = require('memcached')
---
...

tarantool> mc.create('instance', '127.0.0.1:8080', { proto = 'text'})
---
- error: '/home/sergeyb/sources/MRG/memcached/memcached/init.lua:111: attempt to index
    field ''cfg'' (a function value)'
...

tarantool> 

memcached/init.lua:

109     readahead = {                                                                
110         'number',                                                                
111         function() return box.cfg.readahead end,                                 
112         function(x) return x > 0 and x < math.pow(2, 10) end,                    
113         [[size of readahead buffer]]                                             
114     },                                                                           
115     expire_enabled = {                                                           
116         'boolean',                                               

Version: 617478d

@kyukhin kyukhin added bug Something isn't working teamE labels Dec 10, 2021
@Totktonada Totktonada added 1sp good first issue Good for newcomers labels Dec 23, 2021
ligurio added a commit that referenced this issue Jan 14, 2022
memcached shows unclear error when memcached instance created without box
initialization:

```
tarantool> mc = require('memcached')
tarantool> mc.create('instance', '127.0.0.1:8080', { proto = 'text'})
---
- error: '/home/sergeyb/sources/MRG/memcached/memcached/init.lua:111: attempt to index
    field ''cfg'' (a function value)'
...
```

With patch memcached checks whether box is initialized or not and shows a
correct message:

tarantool> mc.create('instance', '127.0.0.1:8080', { proto = 'text'})
---
- error: '/home/sergeyb/sources/MRG/memcached/memcached/init.lua:344: Tarantool must
    be initialized with box.cfg()'
...

Fixes #76
ligurio added a commit that referenced this issue Jan 14, 2022
memcached shows unclear error when memcached instance created without box
initialization:

```
tarantool> mc = require('memcached')
tarantool> mc.create('instance', '127.0.0.1:8080', { proto = 'text'})
---
- error: '/home/sergeyb/sources/MRG/memcached/memcached/init.lua:111: attempt to index
    field ''cfg'' (a function value)'
...
```

With patch memcached checks whether box is initialized or not and shows a
correct message:

```
tarantool> mc.create('instance', '127.0.0.1:8080', { proto = 'text'})
---
- error: '/home/sergeyb/sources/MRG/memcached/memcached/init.lua:344: Tarantool must
    be initialized with box.cfg()'
...
```

Fixes #76
ligurio added a commit that referenced this issue Jan 25, 2022
memcached shows unclear error when memcached instance created without box
initialization:

```
tarantool> mc = require('memcached')
tarantool> mc.create('instance', '127.0.0.1:8080', { proto = 'text'})
---
- error: '/home/sergeyb/sources/MRG/memcached/memcached/init.lua:111: attempt to index
    field ''cfg'' (a function value)'
...
```

With patch memcached checks whether box is initialized or not and shows a
correct message:

```
tarantool> mc.create('instance', '127.0.0.1:8080', { proto = 'text'})
---
- error: '/home/sergeyb/sources/MRG/memcached/memcached/init.lua:344: Please call
    box.cfg{} first'
...
```

Fixes #76
ligurio added a commit that referenced this issue Jan 25, 2022
memcached shows unclear error when memcached instance created without box
initialization:

```
tarantool> mc = require('memcached')
tarantool> mc.create('instance', '127.0.0.1:8080', { proto = 'text'})
---
- error: '/home/sergeyb/sources/MRG/memcached/memcached/init.lua:111: attempt to index
    field ''cfg'' (a function value)'
...
```

With patch memcached checks whether box is initialized or not and shows a
correct message:

```
tarantool> mc.create('instance', '127.0.0.1:8080', { proto = 'text'})
---
- error: '/home/sergeyb/sources/MRG/memcached/memcached/init.lua:344: Please call
    box.cfg{} first'
...
```

Fixes #76
ligurio added a commit that referenced this issue Feb 1, 2022
memcached shows unclear error when memcached instance created without box
initialization:

```
tarantool> mc = require('memcached')
tarantool> mc.create('instance', '127.0.0.1:8080', { proto = 'text'})
---
- error: '/home/sergeyb/sources/MRG/memcached/memcached/init.lua:111: attempt to index
    field ''cfg'' (a function value)'
...
```

With patch memcached checks whether box is initialized or not and shows a
correct message:

```
tarantool> mc.create('instance', '127.0.0.1:8080', { proto = 'text'})
---
- error: '/home/sergeyb/sources/MRG/memcached/memcached/init.lua:344: Please call
    box.cfg{} first'
...
```

Fixes #76
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants