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













0
















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...










share|improve this question
























  • 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















0
















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...










share|improve this question
























  • 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













0












0








0









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...










share|improve this question

















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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

















  • 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












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
);



);













draft saved

draft discarded


















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















draft saved

draft discarded
















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

Identity Server 4 is not redirecting to Angular app after login2019 Community Moderator ElectionIdentity Server 4 and dockerIdentityserver implicit flow unauthorized_clientIdentityServer Hybrid Flow - Access Token is null after user successful loginIdentity Server to MVC client : Page Redirect After loginLogin with Steam OpenId(oidc-client-js)Identity Server 4+.NET Core 2.0 + IdentityIdentityServer4 post-login redirect not working in Edge browserCall to IdentityServer4 generates System.NullReferenceException: Object reference not set to an instance of an objectIdentityServer4 without HTTPS not workingHow to get Authorization code from identity server without login form

2005 Ahvaz unrest Contents Background Causes Casualties Aftermath See also References Navigation menue"At Least 10 Are Killed by Bombs in Iran""Iran"Archived"Arab-Iranians in Iran to make April 15 'Day of Fury'"State of Mind, State of Order: Reactions to Ethnic Unrest in the Islamic Republic of Iran.10.1111/j.1754-9469.2008.00028.x"Iran hangs Arab separatists"Iran Overview from ArchivedConstitution of the Islamic Republic of Iran"Tehran puzzled by forged 'riots' letter""Iran and its minorities: Down in the second class""Iran: Handling Of Ahvaz Unrest Could End With Televised Confessions""Bombings Rock Iran Ahead of Election""Five die in Iran ethnic clashes""Iran: Need for restraint as anniversary of unrest in Khuzestan approaches"Archived"Iranian Sunni protesters killed in clashes with security forces"Archived

Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme