fix(openai): cleanup receipt의 중복 history gate를 제거한다
This commit is contained in:
parent
450522186b
commit
1a25ba3e6d
1 changed files with 4 additions and 3 deletions
|
|
@ -335,7 +335,7 @@ func (c *logicalRequestCoordinator) commitCleanupByLineage(
|
|||
var target *logicalRequestRecord
|
||||
for _, record := range c.requests {
|
||||
if record.state == logicalRequestStateCleanup && record.cleanup && record.ownerEdgeID == ownerEdgeID && record.principalRef == principalRef &&
|
||||
record.lineage == lineage.Prefix && sameLogicalRequestResultIDs(record.expected, lineage.ResultIDs) {
|
||||
sameLogicalRequestResultIDs(record.expected, lineage.ResultIDs) {
|
||||
target = record
|
||||
break
|
||||
}
|
||||
|
|
@ -343,8 +343,9 @@ func (c *logicalRequestCoordinator) commitCleanupByLineage(
|
|||
if target == nil {
|
||||
return logicalRequestSnapshot{}, errLogicalRequestNotFound
|
||||
}
|
||||
if err := validateLogicalRequestContinuationLineage(target.lineage, target.expectedIssuedCallHash, target.expected, lineage); err != nil {
|
||||
return logicalRequestSnapshot{}, err
|
||||
if target.lineage.Endpoint != lineage.Prefix.Endpoint || target.lineage.ToolsetDigest != lineage.Prefix.ToolsetDigest ||
|
||||
target.expectedIssuedCallHash != lineage.IssuedCallHash {
|
||||
return logicalRequestSnapshot{}, errLogicalRequestLineage
|
||||
}
|
||||
snapshot := target.snapshot()
|
||||
delete(c.requests, target.id)
|
||||
|
|
|
|||
Loading…
Reference in a new issue