tarantool pairs fetch not all tuplesCases when tarantool yieldstarantool long WAL writeReference Search in TarantoolIs it possible to select only keys (not whole tuple) from Tarantool DB?How to use Tarantool in windows platformTarantool - creating primary indexTarantool - AUTOINCREMENT equivalent?Tarantool - Named fields?Where is tarantool SQL support?Cache Coherency with Tarantool
How do I lift the insulation blower into the attic?
I keep switching characters, how do I stop?
Why is indicated airspeed rather than ground speed used during the takeoff roll?
Amorphous proper classes in MK
If the Dominion rule using their Jem'Hadar troops, why is their life expectancy so low?
What is the meaning of "You've never met a graph you didn't like?"
How can a new country break out from a developed country without war?
Asserting that Atheism and Theism are both faith based positions
How to split IPA spelling into syllables
"Oh no!" in Latin
Error in master's thesis, I do not know what to do
Mortal danger in mid-grade literature
Make a Bowl of Alphabet Soup
C++ lambda syntax
Why is implicit conversion not ambiguous for non-primitive types?
PTIJ: Which Dr. Seuss books should one obtain?
Is divisi notation needed for brass or woodwind in an orchestra?
Is there any common country to visit for persons holding UK and Schengen visas?
How do you justify more code being written by following clean code practices?
Should a narrator ever describe things based on a character's view instead of facts?
Why didn't Voldemort know what Grindelwald looked like?
Do I have to take mana from my deck or hand when tapping this card?
Why is participating in the European Parliamentary elections used as a threat?
Not hide and seek
tarantool pairs fetch not all tuples
Cases when tarantool yieldstarantool long WAL writeReference Search in TarantoolIs it possible to select only keys (not whole tuple) from Tarantool DB?How to use Tarantool in windows platformTarantool - creating primary indexTarantool - AUTOINCREMENT equivalent?Tarantool - Named fields?Where is tarantool SQL support?Cache Coherency with Tarantool
box.space.test.index.secondary:select(1,'RU', 2)
---
- - [47, 6, 1, 'RU', 2, 11, 6]
- [44, 3, 1, 'RU', 2, 101, 6]
- [42, 1, 1, 'RU', 2, 189, 6]
- [34, 3, 1, 'RU', 2, 260, 5]
- [49, 8, 1, 'RU', 2, 290, 6]
- [41, 0, 1, 'RU', 2, 303, 6]
- [37, 6, 1, 'RU', 2, 494, 5]
- [35, 4, 1, 'RU', 2, 633, 5]
- [45, 4, 1, 'RU', 2, 694, 6]
- [43, 2, 1, 'RU', 2, 780, 6]
- [46, 5, 1, 'RU', 2, 833, 6]
- [40, 9, 1, 'RU', 2, 870, 5]
- [48, 7, 1, 'RU', 2, 927, 6]
- [50, 9, 1, 'RU', 2, 930, 6]
...
box.space.test.index.secondary
---
- unique: false
parts:
- type: NUM
fieldno: 3
- type: STR
fieldno: 4
- type: NUM
fieldno: 5
- type: NUM
fieldno: 6
id: 2
space_id: 512
name: secondary
type: TREE
...
local r='' for k,tuple in box.space.test.index.secondary:pairs(1, 'RU', 2) do r=r..', found ('..tuple[1]..')' if (tuple[7]<6) then r = r .. ', delete(' ..tuple[1] .. ')' box.space.test:delete(tuple[1]) end end return r
---
- ', found (47), found (44), found (42), found (34), delete(34), found (41), found(37), delete(37), found (45), found (43), found (46), found (40), delete(40), found(50)'
...
box.space.test.index.secondary:select(1,'RU', 2)
---
- - [47, 6, 1, 'RU', 2, 11, 6]
- [44, 3, 1, 'RU', 2, 101, 6]
- [42, 1, 1, 'RU', 2, 189, 6]
- [49, 8, 1, 'RU', 2, 290, 6]
- [41, 0, 1, 'RU', 2, 303, 6]
- [35, 4, 1, 'RU', 2, 633, 5]
- [45, 4, 1, 'RU', 2, 694, 6]
- [43, 2, 1, 'RU', 2, 780, 6]
- [46, 5, 1, 'RU', 2, 833, 6]
- [48, 7, 1, 'RU', 2, 927, 6]
- [50, 9, 1, 'RU', 2, 930, 6]
...
local r='' for k,tuple in box.space.test.index.secondary:pairs(1, 'RU', 2) do r=r..', found ('..tuple[1]..')' if (tuple[7]<6) then r = r .. ', delete(' ..tuple[1] .. ')' box.space.test:delete(tuple[1]) end end return r
---
- ', found (47), found (44), found (42), found (49), found (41), found (35), delete(35), found (43), found (46), found (48), found (50)'
...
box.space.test.index.secondary:select(1,'RU', 2)
---
- - [47, 6, 1, 'RU', 2, 11, 6]
- [44, 3, 1, 'RU', 2, 101, 6]
- [42, 1, 1, 'RU', 2, 189, 6]
- [49, 8, 1, 'RU', 2, 290, 6]
- [41, 0, 1, 'RU', 2, 303, 6]
- [45, 4, 1, 'RU', 2, 694, 6]
- [43, 2, 1, 'RU', 2, 780, 6]
- [46, 5, 1, 'RU', 2, 833, 6]
- [48, 7, 1, 'RU', 2, 927, 6]
- [50, 9, 1, 'RU', 2, 930, 6]
...
As I see :pairs don't see 35 tuple in first run, and see it only on second execution. Why?
p.s.: sorry for long explanation...
tarantool
add a comment |
box.space.test.index.secondary:select(1,'RU', 2)
---
- - [47, 6, 1, 'RU', 2, 11, 6]
- [44, 3, 1, 'RU', 2, 101, 6]
- [42, 1, 1, 'RU', 2, 189, 6]
- [34, 3, 1, 'RU', 2, 260, 5]
- [49, 8, 1, 'RU', 2, 290, 6]
- [41, 0, 1, 'RU', 2, 303, 6]
- [37, 6, 1, 'RU', 2, 494, 5]
- [35, 4, 1, 'RU', 2, 633, 5]
- [45, 4, 1, 'RU', 2, 694, 6]
- [43, 2, 1, 'RU', 2, 780, 6]
- [46, 5, 1, 'RU', 2, 833, 6]
- [40, 9, 1, 'RU', 2, 870, 5]
- [48, 7, 1, 'RU', 2, 927, 6]
- [50, 9, 1, 'RU', 2, 930, 6]
...
box.space.test.index.secondary
---
- unique: false
parts:
- type: NUM
fieldno: 3
- type: STR
fieldno: 4
- type: NUM
fieldno: 5
- type: NUM
fieldno: 6
id: 2
space_id: 512
name: secondary
type: TREE
...
local r='' for k,tuple in box.space.test.index.secondary:pairs(1, 'RU', 2) do r=r..', found ('..tuple[1]..')' if (tuple[7]<6) then r = r .. ', delete(' ..tuple[1] .. ')' box.space.test:delete(tuple[1]) end end return r
---
- ', found (47), found (44), found (42), found (34), delete(34), found (41), found(37), delete(37), found (45), found (43), found (46), found (40), delete(40), found(50)'
...
box.space.test.index.secondary:select(1,'RU', 2)
---
- - [47, 6, 1, 'RU', 2, 11, 6]
- [44, 3, 1, 'RU', 2, 101, 6]
- [42, 1, 1, 'RU', 2, 189, 6]
- [49, 8, 1, 'RU', 2, 290, 6]
- [41, 0, 1, 'RU', 2, 303, 6]
- [35, 4, 1, 'RU', 2, 633, 5]
- [45, 4, 1, 'RU', 2, 694, 6]
- [43, 2, 1, 'RU', 2, 780, 6]
- [46, 5, 1, 'RU', 2, 833, 6]
- [48, 7, 1, 'RU', 2, 927, 6]
- [50, 9, 1, 'RU', 2, 930, 6]
...
local r='' for k,tuple in box.space.test.index.secondary:pairs(1, 'RU', 2) do r=r..', found ('..tuple[1]..')' if (tuple[7]<6) then r = r .. ', delete(' ..tuple[1] .. ')' box.space.test:delete(tuple[1]) end end return r
---
- ', found (47), found (44), found (42), found (49), found (41), found (35), delete(35), found (43), found (46), found (48), found (50)'
...
box.space.test.index.secondary:select(1,'RU', 2)
---
- - [47, 6, 1, 'RU', 2, 11, 6]
- [44, 3, 1, 'RU', 2, 101, 6]
- [42, 1, 1, 'RU', 2, 189, 6]
- [49, 8, 1, 'RU', 2, 290, 6]
- [41, 0, 1, 'RU', 2, 303, 6]
- [45, 4, 1, 'RU', 2, 694, 6]
- [43, 2, 1, 'RU', 2, 780, 6]
- [46, 5, 1, 'RU', 2, 833, 6]
- [48, 7, 1, 'RU', 2, 927, 6]
- [50, 9, 1, 'RU', 2, 930, 6]
...
As I see :pairs don't see 35 tuple in first run, and see it only on second execution. Why?
p.s.: sorry for long explanation...
tarantool
It return only unique (by fields from index) tuples?...
– Sergey
Jun 1 '17 at 14:12
Or maybe tarantool move internal pointer to next tuple in list, when we :delete tuple by primary key..?
– Sergey
Jun 1 '17 at 14:22
I found answer myself. Tarantool rebuild index during loop, so when i iterate in pairs I skip some records. Correct is get portion of tuples by select, iterate it deleting each one, get new portion .... while data exists.
– Sergey
Jun 1 '17 at 16:21
add a comment |
box.space.test.index.secondary:select(1,'RU', 2)
---
- - [47, 6, 1, 'RU', 2, 11, 6]
- [44, 3, 1, 'RU', 2, 101, 6]
- [42, 1, 1, 'RU', 2, 189, 6]
- [34, 3, 1, 'RU', 2, 260, 5]
- [49, 8, 1, 'RU', 2, 290, 6]
- [41, 0, 1, 'RU', 2, 303, 6]
- [37, 6, 1, 'RU', 2, 494, 5]
- [35, 4, 1, 'RU', 2, 633, 5]
- [45, 4, 1, 'RU', 2, 694, 6]
- [43, 2, 1, 'RU', 2, 780, 6]
- [46, 5, 1, 'RU', 2, 833, 6]
- [40, 9, 1, 'RU', 2, 870, 5]
- [48, 7, 1, 'RU', 2, 927, 6]
- [50, 9, 1, 'RU', 2, 930, 6]
...
box.space.test.index.secondary
---
- unique: false
parts:
- type: NUM
fieldno: 3
- type: STR
fieldno: 4
- type: NUM
fieldno: 5
- type: NUM
fieldno: 6
id: 2
space_id: 512
name: secondary
type: TREE
...
local r='' for k,tuple in box.space.test.index.secondary:pairs(1, 'RU', 2) do r=r..', found ('..tuple[1]..')' if (tuple[7]<6) then r = r .. ', delete(' ..tuple[1] .. ')' box.space.test:delete(tuple[1]) end end return r
---
- ', found (47), found (44), found (42), found (34), delete(34), found (41), found(37), delete(37), found (45), found (43), found (46), found (40), delete(40), found(50)'
...
box.space.test.index.secondary:select(1,'RU', 2)
---
- - [47, 6, 1, 'RU', 2, 11, 6]
- [44, 3, 1, 'RU', 2, 101, 6]
- [42, 1, 1, 'RU', 2, 189, 6]
- [49, 8, 1, 'RU', 2, 290, 6]
- [41, 0, 1, 'RU', 2, 303, 6]
- [35, 4, 1, 'RU', 2, 633, 5]
- [45, 4, 1, 'RU', 2, 694, 6]
- [43, 2, 1, 'RU', 2, 780, 6]
- [46, 5, 1, 'RU', 2, 833, 6]
- [48, 7, 1, 'RU', 2, 927, 6]
- [50, 9, 1, 'RU', 2, 930, 6]
...
local r='' for k,tuple in box.space.test.index.secondary:pairs(1, 'RU', 2) do r=r..', found ('..tuple[1]..')' if (tuple[7]<6) then r = r .. ', delete(' ..tuple[1] .. ')' box.space.test:delete(tuple[1]) end end return r
---
- ', found (47), found (44), found (42), found (49), found (41), found (35), delete(35), found (43), found (46), found (48), found (50)'
...
box.space.test.index.secondary:select(1,'RU', 2)
---
- - [47, 6, 1, 'RU', 2, 11, 6]
- [44, 3, 1, 'RU', 2, 101, 6]
- [42, 1, 1, 'RU', 2, 189, 6]
- [49, 8, 1, 'RU', 2, 290, 6]
- [41, 0, 1, 'RU', 2, 303, 6]
- [45, 4, 1, 'RU', 2, 694, 6]
- [43, 2, 1, 'RU', 2, 780, 6]
- [46, 5, 1, 'RU', 2, 833, 6]
- [48, 7, 1, 'RU', 2, 927, 6]
- [50, 9, 1, 'RU', 2, 930, 6]
...
As I see :pairs don't see 35 tuple in first run, and see it only on second execution. Why?
p.s.: sorry for long explanation...
tarantool
box.space.test.index.secondary:select(1,'RU', 2)
---
- - [47, 6, 1, 'RU', 2, 11, 6]
- [44, 3, 1, 'RU', 2, 101, 6]
- [42, 1, 1, 'RU', 2, 189, 6]
- [34, 3, 1, 'RU', 2, 260, 5]
- [49, 8, 1, 'RU', 2, 290, 6]
- [41, 0, 1, 'RU', 2, 303, 6]
- [37, 6, 1, 'RU', 2, 494, 5]
- [35, 4, 1, 'RU', 2, 633, 5]
- [45, 4, 1, 'RU', 2, 694, 6]
- [43, 2, 1, 'RU', 2, 780, 6]
- [46, 5, 1, 'RU', 2, 833, 6]
- [40, 9, 1, 'RU', 2, 870, 5]
- [48, 7, 1, 'RU', 2, 927, 6]
- [50, 9, 1, 'RU', 2, 930, 6]
...
box.space.test.index.secondary
---
- unique: false
parts:
- type: NUM
fieldno: 3
- type: STR
fieldno: 4
- type: NUM
fieldno: 5
- type: NUM
fieldno: 6
id: 2
space_id: 512
name: secondary
type: TREE
...
local r='' for k,tuple in box.space.test.index.secondary:pairs(1, 'RU', 2) do r=r..', found ('..tuple[1]..')' if (tuple[7]<6) then r = r .. ', delete(' ..tuple[1] .. ')' box.space.test:delete(tuple[1]) end end return r
---
- ', found (47), found (44), found (42), found (34), delete(34), found (41), found(37), delete(37), found (45), found (43), found (46), found (40), delete(40), found(50)'
...
box.space.test.index.secondary:select(1,'RU', 2)
---
- - [47, 6, 1, 'RU', 2, 11, 6]
- [44, 3, 1, 'RU', 2, 101, 6]
- [42, 1, 1, 'RU', 2, 189, 6]
- [49, 8, 1, 'RU', 2, 290, 6]
- [41, 0, 1, 'RU', 2, 303, 6]
- [35, 4, 1, 'RU', 2, 633, 5]
- [45, 4, 1, 'RU', 2, 694, 6]
- [43, 2, 1, 'RU', 2, 780, 6]
- [46, 5, 1, 'RU', 2, 833, 6]
- [48, 7, 1, 'RU', 2, 927, 6]
- [50, 9, 1, 'RU', 2, 930, 6]
...
local r='' for k,tuple in box.space.test.index.secondary:pairs(1, 'RU', 2) do r=r..', found ('..tuple[1]..')' if (tuple[7]<6) then r = r .. ', delete(' ..tuple[1] .. ')' box.space.test:delete(tuple[1]) end end return r
---
- ', found (47), found (44), found (42), found (49), found (41), found (35), delete(35), found (43), found (46), found (48), found (50)'
...
box.space.test.index.secondary:select(1,'RU', 2)
---
- - [47, 6, 1, 'RU', 2, 11, 6]
- [44, 3, 1, 'RU', 2, 101, 6]
- [42, 1, 1, 'RU', 2, 189, 6]
- [49, 8, 1, 'RU', 2, 290, 6]
- [41, 0, 1, 'RU', 2, 303, 6]
- [45, 4, 1, 'RU', 2, 694, 6]
- [43, 2, 1, 'RU', 2, 780, 6]
- [46, 5, 1, 'RU', 2, 833, 6]
- [48, 7, 1, 'RU', 2, 927, 6]
- [50, 9, 1, 'RU', 2, 930, 6]
...
As I see :pairs don't see 35 tuple in first run, and see it only on second execution. Why?
p.s.: sorry for long explanation...
tarantool
tarantool
edited Mar 7 at 20:07
Brian Tompsett - 汤莱恩
4,2421339102
4,2421339102
asked Jun 1 '17 at 13:31
SergeySergey
11
11
It return only unique (by fields from index) tuples?...
– Sergey
Jun 1 '17 at 14:12
Or maybe tarantool move internal pointer to next tuple in list, when we :delete tuple by primary key..?
– Sergey
Jun 1 '17 at 14:22
I found answer myself. Tarantool rebuild index during loop, so when i iterate in pairs I skip some records. Correct is get portion of tuples by select, iterate it deleting each one, get new portion .... while data exists.
– Sergey
Jun 1 '17 at 16:21
add a comment |
It return only unique (by fields from index) tuples?...
– Sergey
Jun 1 '17 at 14:12
Or maybe tarantool move internal pointer to next tuple in list, when we :delete tuple by primary key..?
– Sergey
Jun 1 '17 at 14:22
I found answer myself. Tarantool rebuild index during loop, so when i iterate in pairs I skip some records. Correct is get portion of tuples by select, iterate it deleting each one, get new portion .... while data exists.
– Sergey
Jun 1 '17 at 16:21
It return only unique (by fields from index) tuples?...
– Sergey
Jun 1 '17 at 14:12
It return only unique (by fields from index) tuples?...
– Sergey
Jun 1 '17 at 14:12
Or maybe tarantool move internal pointer to next tuple in list, when we :delete tuple by primary key..?
– Sergey
Jun 1 '17 at 14:22
Or maybe tarantool move internal pointer to next tuple in list, when we :delete tuple by primary key..?
– Sergey
Jun 1 '17 at 14:22
I found answer myself. Tarantool rebuild index during loop, so when i iterate in pairs I skip some records. Correct is get portion of tuples by select, iterate it deleting each one, get new portion .... while data exists.
– Sergey
Jun 1 '17 at 16:21
I found answer myself. Tarantool rebuild index during loop, so when i iterate in pairs I skip some records. Correct is get portion of tuples by select, iterate it deleting each one, get new portion .... while data exists.
– Sergey
Jun 1 '17 at 16:21
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f44308974%2ftarantool-pairs-fetch-not-all-tuples%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f44308974%2ftarantool-pairs-fetch-not-all-tuples%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
It return only unique (by fields from index) tuples?...
– Sergey
Jun 1 '17 at 14:12
Or maybe tarantool move internal pointer to next tuple in list, when we :delete tuple by primary key..?
– Sergey
Jun 1 '17 at 14:22
I found answer myself. Tarantool rebuild index during loop, so when i iterate in pairs I skip some records. Correct is get portion of tuples by select, iterate it deleting each one, get new portion .... while data exists.
– Sergey
Jun 1 '17 at 16:21