Giter VIP home page Giter VIP logo

Comments (3)

vrogach2020 avatar vrogach2020 commented on August 11, 2024

Hi, sorry for issue without a repro. I've found the condition that had this problem:

    local result, err = server.net_box:call('crud.select', {'person_cross_ref', {{ '=', 'PartyUId', partyUId }}, {first = 1000} })
    log.info("CRUD RESULT rows " .. #result.rows ) -- ..", " .. utils.dump(result.rows))

    result, err = server.net_box:eval('return box.space.person_cross_ref:select()')
    log.info("SPACE RESULT rows = " .. #result)

Output:

CRUD RESULT rows 100
SPACE RESULT rows = 116

Space definition:

return {
    ---
    --- This migration creates cross-reference storage space 'person_cross_ref'.
    ---
    --- For each person there is a set of cross-reference records:
    --- {
    ---     partyUId = 'P123',
    ---     crossRefData = {{externalId, systemNumber, endDate}, ...}
    --- }
    ---
    up = function()
        local utils = require('migrator.utils')
        local s = box.schema.create_space('person_cross_ref', { if_not_exists = true })

        s:format({
            -- vshard bucket id
            { name = 'bucket_id', type = 'unsigned', is_nullable = false },

            -- global record ID in  Customer HUB
            { name = 'partyUId', type = 'string', is_nullable = false },

            --  cross-reference array of objects
            --  {
            --      externalId      -- string, person id in external system
            --      systemNumber    -- string, the id of external system
            --      endDate,        -- number, cross-ref validity unix-time (ms)
            --  }
            { name = 'crossRefData', type = 'array', is_nullable = true },
        })

        s:create_index('person_cross_ref_pk', {
            parts = { 'partyUId' },
            unique = true,
            if_not_exists = true,
            type = 'TREE'
        })

        s:create_index('bucket_id', {
            parts = { 'bucket_id' },
            unique = false,
            if_not_exists = true,
            type = 'TREE'
        })

        utils.register_sharding_key('person_cross_ref', { 'bucket_id' })
        return true
    end
}

This reproduced on outdated version of crud. Need to retest on new versions..
Reproduced on these versions:

 'cartridge == 2.3.0-1',
  'crud == 0.4.0-1',

from crud.

mRrvz avatar mRrvz commented on August 11, 2024
    local result, err = server.net_box:call('crud.select', {'person_cross_ref', {{ '=', 'PartyUId', partyUId }}, {first = 1000} })

Your space does not contain PartyUId field, but contains partyUId field. Anyway, if we make the same request with partyUId field with crud 0.8.0, no problems arise.

from crud.

vrogach2020 avatar vrogach2020 commented on August 11, 2024

I think we can close it, thanks

from crud.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.