Skip to content

Concurrency control when requesting the kernel API #9939

Closed
@zxhd863943427

Description

@zxhd863943427
Contributor

并发执行api失败

Is there an existing issue for this?

  • I have searched the existing issues

Can the issue be reproduced with the default theme (daylight/midnight)?

  • I was able to reproduce the issue with the default theme

Could the issue be due to extensions?

  • I've ruled out the possibility that the extension is causing the problem.

Describe the problem

图片

最终的结果是块中缺失属性。

Expected result

两者都能正确地执行

Screenshot or screen recording presentation

No response

Version environment

- Version: 2.11.3
- Operating System: win10 
- Browser (if used):

Log file

无需日志

More information

No response

Activity

88250

88250 commented on Dec 20, 2023

@88250
Member

我看好像返回状态是 200 哦,具体是什么表现?

zxhd863943427

zxhd863943427 commented on Dec 20, 2023

@zxhd863943427
ContributorAuthor

api调用成功,但是查看块属性时发现并没有成功设置属性。

88250

88250 commented on Dec 20, 2023

@88250
Member

是被覆盖了还是?

88250

88250 commented on Dec 21, 2023

@88250
Member

暂时无法确定重现步骤,我先关闭了,后续如果有测试代码或者重现步骤请随时跟帖,谢谢。

zxhd863943427

zxhd863943427 commented on Dec 21, 2023

@zxhd863943427
ContributorAuthor

最简单的方式:

fetchSyncPost('/api/riff/addRiffCards',{"deckID":"20230218211946-2kw8jgx","blockIDs":["20230428155440-s8hzxrz"]})
fetchSyncPost('/api/attr/setBlockAttrs',{"id":"20230428155440-s8hzxrz","attrs":{"custom-attr1":"true"}})
fetchSyncPost('/api/attr/setBlockAttrs',{"id":"20230428155440-s8hzxrz","attrs":{"custom-attr2":"true"}})
fetchSyncPost('/api/attr/setBlockAttrs',{"id":"20230428155440-s8hzxrz","attrs":{"custom-attr3":"true"}})
fetchSyncPost('/api/attr/setBlockAttrs',{"id":"20230428155440-s8hzxrz","attrs":{"custom-attr4":"true"}})

大概率属性会缺失。
这是我这边的执行效果:
图片

88250

88250 commented on Dec 21, 2023

@88250
Member

好的,稍晚点我试试。

self-assigned this
on Dec 22, 2023
added this to the 2.11.4 milestone on Dec 22, 2023
reopened this on Dec 22, 2023
88250

88250 commented on Dec 22, 2023

@88250
Member

可以重现问题了,下个版本改进,感谢反馈。

changed the title [-]并发执行api失败[/-] [+]Concurrency control when requesting the kernel API[/+] on Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @88250@zxhd863943427

      Issue actions

        Concurrency control when requesting the kernel API · Issue #9939 · siyuan-note/siyuan