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

Implement the segment caching feature of Sequencer API #158

Closed
seeflood opened this issue Jul 28, 2021 · 9 comments · Fixed by #231
Closed

Implement the segment caching feature of Sequencer API #158

seeflood opened this issue Jul 28, 2021 · 9 comments · Fixed by #231
Assignees
Labels

Comments

@seeflood
Copy link
Member

seeflood commented Jul 28, 2021

What would you like to be added:
Implement the segment caching feature of Sequencer API
You can refer to Leaf to do double buffer optimization
The function to be implemented is at https://github.com/mosn/layotto/blob/main/pkg/runtime/sequencer/cache.go

The design doc(in chinese) is at https://mosn.io/layotto/#/zh/design/sequencer/design

Why is this needed:

@seeflood
Copy link
Member Author

This task will be assigned to @ZLBer

@ZLBer
Copy link
Member

ZLBer commented Jul 31, 2021

建议给sequencer增加是否支持segment的方法,现在GetSegment方法功能不够单一, 在写catch的时候发现有时候只想查看sequencer是否支持segment,并不想直接申请一段。

@seeflood
Copy link
Member Author

seeflood commented Jul 31, 2021

@ZLBer 本来考虑过加个isSupportCache() 后来改成GetSegment了
GetSegment也能解决你说的问题呀,只想判断是否支持segment、不想取号的话,size传0,GetSegment(0)

@ZLBer
Copy link
Member

ZLBer commented Jul 31, 2021

这样啊 怪怪的

@seeflood
Copy link
Member Author

seeflood commented Jul 31, 2021

这样啊 怪怪的

是有点
其实我原来第一版就写的一个单独的判断函数(叫supportSegement还是啥来着忘了)
后来和其他人讨论,别人觉得没必要单独加一个函数;然后我看了下Dapr state组件的BulkGet 设计风格也是往返回结果里加个support,就改成这样了。当时觉得这种其实是个人喜好问题,没啥对与错,既然Dapr之前是这风格那就保持一致吧,就改了
或者你也可以把你的想法写下,我们下周讨论下

@seeflood
Copy link
Member Author

现在实现的话可以先写GetSegment(0) 后面真要改成supportSegment也简单

@ZLBer
Copy link
Member

ZLBer commented Jul 31, 2021

fine

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue or help wanted) or other activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Oct 22, 2021
@github-actions
Copy link

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as pinned, good first issue or help wanted. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants