-
Notifications
You must be signed in to change notification settings - Fork 17
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
Dev/licenses #312
base: master
Are you sure you want to change the base?
Dev/licenses #312
Conversation
feat: parse licenses config feat: queryLicenses feat: licenses malloc and free refactor feat: Add licenses configuration to the config template file refactor feat: Use the cqueue -L parameter to query task information for specified licenses. fix: No error is reported when the task requests non-existent licenses. merge master feat: display 'licenses' for the pending queue reason. fix: ctld restarts without allocating licenses. merge master refactor
merge有问题,改用rebase |
b5a1b64
to
15cd2e0
Compare
@@ -245,7 +247,8 @@ message TaskInfo { | |||
string username = 15; | |||
string qos = 16; | |||
ResourceView res_view = 17; | |||
|
|||
string licenses = 18; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里怎么不用map<string, uint32> licenses_count?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好像是这里只在前端展示用,然后直接后端转成string了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
还是用map好一点
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好
fix: setfields fix: The task that exceeds the total number of licenses should generate an error.
@@ -245,7 +247,8 @@ message TaskInfo { | |||
string username = 15; | |||
string qos = 16; | |||
ResourceView res_view = 17; | |||
|
|||
string licenses = 18; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
还是用map好一点
|
||
namespace Ctld { | ||
|
||
using unorderedLicensesMap = absl::flat_hash_map<LicenseId, License>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是不是可以用AtomicMap,就不用锁了
见前端#194