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

[BUG] <title>Incomplete data returned #5689

Open
1 task done
zhikaichen123 opened this issue Oct 9, 2024 · 1 comment
Open
1 task done

[BUG] <title>Incomplete data returned #5689

zhikaichen123 opened this issue Oct 9, 2024 · 1 comment
Labels
type: bug Something isn't working

Comments

@zhikaichen123
Copy link

zhikaichen123 commented Oct 9, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

返回数据比较多,经过网关时候被截断了,前端接收数据不全,比如:

        "names": [
            {
                "language": "en-US",
                "name": "12122"
            },
            {
                "language": "zh-CN",
                "name": "21212"
            }
        ],
        "sort": 14,
        "status": 1
    }
],
"message": "Success",
"success"

这个是我这边的打印结果,理论上完整大数据还有

Expected Behavior

    {
        "cateCode": "G",
        "children": [],
        "id": 31,
        "name": "12122",
        "names": [
            {
                "language": "en-US",
                "name": "12122"
            },
            {
                "language": "zh-CN",
                "name": "21212"
            }
        ],
        "sort": 14,
        "status": 1
    }
],
"message": "Success",
"success": true

}

这个是期望的结尾, 是一个完整的json数据

Steps To Reproduce

No response

Environment

<parent>
        <groupId>org.apache.shenyu</groupId>
        <artifactId>shenyu-spring-boot-starter-sync-data-center</artifactId>
        <version>2.6.1</version>
    </parent>

这个是版本信息

Debug logs

{
"code": "10-000",
"data": [
{
"cateCode": "E",
"children": [
{
"cateCode": "A",
"children": [
{
"cateCode": "G",
"children": [],
"id": 25,
"name": "E TOW A THREE G",
"names": [
{
"language": "en-US",
"name": "E TOW A THREE G"
},
{
"language": "zh-CN",
"name": "E的二级A的下级G"
}
],
"parentId": 24,
"remark": "E的二级A的下级B",
"sort": 1,
"status": 1
}
],
"id": 24,
"name": "E TOW A",
"names": [
{
"language": "en-US",
"name": "E TOW A"
},
{
"language": "zh-CN",
"name": "E的二级A"
}
],
"parentId": 23,
"remark": "E的二级A",
"sort": 1,
"status": 1
}
],
"id": 23,
"name": "ONE E",
"names": [
{
"language": "en-US",
"name": "ONE E"
},
{
"language": "zh-CN",
"name": "一级 E"
}
],
"remark": "一级E1",
"sort": 1,
"status": 1
},
{
"cateCode": "I",
"children": [
{
"cateCode": "R",
"children": [],
"id": 12,
"name": "type11",
"names": [
{
"language": "en-US",
"name": "type11"
},
{
"language": "zh-CN",
"name": "类型11"
}
],
"parentId": 2,
"remark": "品类备注11",
"sort": 1,
"status": 1
}
],
"id": 2,
"name": "type2",
"names": [
{
"language": "en-US",
"name": "type2"
},
{
"language": "zh-CN",
"name": "类型2"
}
],
"remark": "品类备注2",
"sort": 2,
"status": 0
},
{
"cateCode": "H",
"children": [
{
"cateCode": "L",
"children": [],
"id": 5,
"name": "type5",
"names": [
{
"language": "en-US",
"name": "type5"
},
{
"language": "zh-CN",
"name": "类型5"
}
],
"parentId": 1,
"remark": "品类备注5",
"sort": 1,
"status": 1
},
{
"cateCode": "M",
"children": [],
"id": 6,
"name": "type6",
"names": [
{
"language": "en-US",
"name": "type6"
},
{
"language": "zh-CN",
"name": "类型6"
}
],
"parentId": 1,
"remark": "品类备注6",
"sort": 2,
"status": 1
},
{
"cateCode": "N",
"children": [
{
"cateCode": "O",
"children": [],
"id": 8,
"name": "type8",
"names": [
{
"language": "en-US",
"name": "type8"
},
{
"language": "zh-CN",
"name": "类���8"
}
],
"parentId": 7,
"remark": "品类备注8",
"sort": 1,
"status": 1
},
{
"cateCode": "P",
"children": [
{
"cateCode": "Q",
"children": [],
"id": 10,
"name": "type10",
"names": [
{
"language": "en-US",
"name": "type10"
},
{
"language": "zh-CN",
"name": "类型10"
}
],
"parentId": 9,
"remark": "品类备注10",
"sort": 1,
"status": 1
}
],
"id": 9,
"name": "type9",
"names": [
{
"language": "en-US",
"name": "type9"
},
{
"language": "zh-CN",
"name": "类型9"
}
],
"parentId": 7,
"remark": "品类备注9",
"sort": 2,
"status": 1
}
],
"id": 7,
"name": "type7",
"names": [
{
"language": "en-US",
"name": "type7"
},
{
"language": "zh-CN",
"name": "类型7"
}
],
"parentId": 1,
"remark": "品类备注7",
"sort": 3,
"status": 1
}
],
"id": 1,
"name": "type11",
"names": [
{
"language": "en-US",
"name": "type11"
},
{
"language": "zh-CN",
"name": "类型11"
}
],
"remark": "品类备注11",
"sort": 3,
"status": 0
},
{
"cateCode": "J",
"children": [],
"id": 3,
"name": "type13",
"names": [
{
"language": "en-US",
"name": "type13"
},
{
"language": "zh-CN",
"name": "类型13"
}
],
"remark": "品类备注33",
"sort": 4,
"status": 0
},
{
"cateCode": "B",
"children": [],
"id": 20,
"name": "First level category",
"names": [
{
"language": "en-US",
"name": "First level category"
},
{
"language": "zh-CN",
"name": "一级品类"
}
],
"sort": 5,
"status": 1
},
{
"cateCode": "K",
"children": [],
"id": 4,
"name": "type14",
"names": [
{
"language": "en-US",
"name": "type14"
},
{
"language": "zh-CN",
"name": "类型14"
}
],
"remark": "品类备注4",
"sort": 6,
"status": 0
},
{
"cateCode": "C",
"children": [],
"id": 21,
"name": "First level category B1",
"names": [
{
"language": "en-US",
"name": "First level category B1"
},
{
"language": "zh-CN",
"name": "一级分类B1"
}
],
"sort": 7,
"status": 1
},
{
"cateCode": "D",
"children": [],
"id": 22,
"name": "First level category C",
"names": [
{
"language": "en-US",
"name": "First level category C"
},
{
"language": "zh-CN",
"name": "一级分类C"
}
],
"remark": "备注1",
"sort": 8,
"status": 1
},
{
"cateCode": "Z",
"children": [],
"id": 26,
"name": "121",
"names": [
{
"language": "en-US",
"name": "121"
},
{
"language": "zh-CN",
"name": "212"
}
],
"remark": "1212",
"sort": 9,
"status": 1
},
{
"cateCode": "V",
"children": [],
"id": 27,
"name": "V",
"names": [
{
"language": "en-US",
"name": "V"
},
{
"language": "zh-CN",
"name": "V"
}
],
"remark": "VV",
"sort": 10,
"status": 1
},
{
"cateCode": "U",
"children": [],
"id": 28,
"name": "ZZ",
"names": [
{
"language": "en-US",
"name": "ZZ"
},
{
"language": "zh-CN",
"name": "ZZ"
}
],
"remark": "品类备注",
"sort": 11,
"status": 1
},
{
"cateCode": "P",
"children": [],
"id": 29,
"name": "Q",
"names": [
{
"language": "en-US",
"name": "Q"
},
{
"language": "zh-CN",
"name": "Q久"
}
],
"remark": "品类备注dddd",
"sort": 12,
"status": 1
},
{
"cateCode": "W",
"children": [],
"id": 30,
"name": "W",
"names": [
{
"language": "en-US",
"name": "W"
},
{
"language": "zh-CN",
"name": "W久"
}
],
"remark": "Wxx",
"sort": 13,
"status": 1
},
{
"cateCode": "G",
"children": [],
"id": 31,
"name": "12122",
"names": [
{
"language": "en-US",
"name": "12122"
},
{
"language": "zh-CN",
"name": "21212"
}
],
"sort": 14,
"status": 1
}
],
"message": "Success",
"success"

Anything else?

有3个怀疑:

  1. 返回数据被截断了,可能是返回数据量有限制,这个需要怎么调整
  2. 返回数据被截断了,可能是块传输机制导致的,这个需要怎么配置
  3. 返回数据不是截断了,而是有一层拦截器,并且这块对json解析有问题,导致漏了最后的
@zhikaichen123 zhikaichen123 added the type: bug Something isn't working label Oct 9, 2024
@bin1315
Copy link

bin1315 commented Nov 9, 2024

I also encountered the same problem. I turned on ModifyResponsePlugin and printed the data content, and found that the data was consistent, but the data received in nginx became smaller. I don't know what else to do after ModifyResponsePlugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants