| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
chore: consolidate sandbox post-merge fixes Preserve the original sandbox merge history while folding the follow-up CI, codecheck, packaging, deploy, and conflict-resolution commits into one merge commit. The tree is identical to the previous MR head 25a7b4e1fd7ea62d90e2e310a9b7414e4fb2d8a4. Signed-off-by: mhsong2 <songminhui2@huawei.com> | 1 个月前 | |
add k8s deploy | 7 个月前 | |
refactor(go): remove GOPATH symlink for protobuf generation - Remove symlink creation logic in compile_functions.sh - Update gen_grpc_pb.sh to output directly to project directory using --go_opt=module and --go-grpc_opt=module flags - Fix proto go_package paths from 'faas/...' to 'yuanrong.org/kernel/...' to match the module name Signed-off-by: yuchaow <wangyuchao12@huawei.com> | 3 个月前 | |
add k8s deploy | 7 个月前 | |
add k8s deploy | 7 个月前 | |
add k8s deploy | 7 个月前 | |
add k8s deploy | 7 个月前 | |
feat[all]: merge ant branch with sandbox, snapshot, and aio features Major changes: - Add sandbox functionality for function execution isolation - Add snapshot/snapstart support for checkpoint management - Add AIO (all-in-one) example with Docker deployment - Support loading environment variables from .env files - Add port forwarding functionality - Improve multi-language APIs (Python/Java/Go/C++) - Optimize build and deployment scripts - Update documentation and examples - Add submodules: datasystem, frontend, functionsystem Signed-off-by: songminhui <songminhui2@huawei.com> | 3 个月前 | |
feat[all]: merge ant branch with sandbox, snapshot, and aio features Major changes: - Add sandbox functionality for function execution isolation - Add snapshot/snapstart support for checkpoint management - Add AIO (all-in-one) example with Docker deployment - Support loading environment variables from .env files - Add port forwarding functionality - Improve multi-language APIs (Python/Java/Go/C++) - Optimize build and deployment scripts - Update documentation and examples - Add submodules: datasystem, frontend, functionsystem Signed-off-by: songminhui <songminhui2@huawei.com> | 3 个月前 | |
fix[faasscheduler]: add session-based lightweight scheduling branch (LiteScheduler) with noopSender Add a session-sticky lightweight scheduling bypass (LiteScheduler) on top of the existing FaaSScheduler. When a request carries a sessionID, it enters the lite branch instead of the legacy PoolManager/GenericInstancePool path. The lite branch provides acquire/release/retain/batchRetain with bounded cold-start polling and per-request Prometheus metrics. Cold-start design: LiteScheduler constructs a ScaleHint (capacity demand hint) and sends it via the ScaleHintSender interface. The current default implementation is noopSender (logs only, no scaler dispatch), which serves as a placeholder for future HTTP/gRPC sender implementations. Instance creation is handled by ReplicaScaler's minInstance mechanism. The ScaleHintSender interface is the single seam: swapping noopSender for an httpSender/grpcSender requires no changes to operation.go or litescheduler.go. Architecture: Core types (go/pkg/functionscaler/): - types.go: LiteSchedulerConfig (Enable/EnableAllTenants/EnabledTenants/ EnabledFunctions/AcquireWaitTimeoutMs/UseExistingLease/SessionIdleTimeoutS) - config.go: normalizeLiteScheduler fills defaults (timeout<=0 -> 3000, nil slices -> empty) - selfregister/proxy.go: CheckHashOwner generalizes CheckFuncOwner to an arbitrary hash key (funcKey for legacy, tenantID/sessionID for lite). - scaler/instance_scaler.go: ScaleHint struct (no ReceiveScaleHint on the InstanceScaler interface; noopSender replaces inProcessSender). - faasscheduler.go: mount LiteScheduler (enable-guarded), bypass entry before the legacy switch; inject NewNoopSender(); register LiteCollector with the default prometheus registry. - metrics/prometheus_metric.go: relax InitServerMetric guard from ScenarioWiseCloud-only to MetricsAddr-non-empty. New package go/pkg/functionscaler/litescheduler/: - allocation.go: Allocation + allocationID gen/parse (lite:{sha256-16hex}:{instanceID}:thread:{seq}; full sessionID not embedded to avoid leakage). - pool.go: LiteInstance/LiteFunctionPool/PoolStats/Dispatcher interface + status mapping (Running/SubHealth/Unavailable) + Stats()/candidateSlotsLocked. - dispatcher.go: concurrency (lowest InUse/Capacity + subHealth penalty) and round-robin (cursor, healthy-then-subHealth fallback) dispatchers; newDispatcher picks by SchedulePolicy, unknown degrades to concurrency. - litescheduler.go: LiteScheduler (pools/allocations + RWMutex, ownerProxy, funcSpecGetter, scaleHintSender, stopCh) + New (live-read config, no snapshot) + isFuncEnabled three-tier whitelist + Pools()/Metrics() accessors. - request.go: LiteRequest + ParseRequest trigger matrix (6 paths, ok=false falls back to legacy) + extractSessionID + panic recovery. - operation.go: handleAcquire (session-sticky + dispatch + cold-start) / assignInstance / handleRelease / handleRetain / handleBatchRetain / handleColdStart (ScaleHint + bounded waitForInstance polling) with pool.Lock->allocMu.Lock single-direction lock ordering (no AB-BA). - event.go: three independent registry subscriptions (FuncSpec/InsSpec/ SchedulerProxy) + goroutine loops with select stopCh for graceful exit; upsertPool/deletePool/handleInstanceUpdate handleInstanceDelete keep instances/sessions/allocations in sync. - scalehint.go: noopSender logs hints but does not dispatch them; future implementations (httpSender/grpcSender) can be injected via New(). - metrics.go: LiteCollector (8 faas_lite_* metrics, read-at-scrape Gauges + request-path Counters); incAcquire/incRelease/incRetain/incScaleHint wired into operation.go handlers. - Process: reverse lookup (alloc -> sessionID/tenantID/funcKey), isFuncEnabled recheck, owner check (acquire-only, traffic owner = tenantID/sessionID), dispatch with panic recovery. Deploy rendering: - go/build/faas/init_scheduler_args.json (liteScheduler block with {liteXxx} placeholders) + api/python/yr/cli/values.toml ([values.lite_scheduler]) + faas_scheduler.py/function_scheduler.py. - K8s: deploy/k8s/charts/openyuanrong values.yaml (global.functionScheduler. liteScheduler) + scheduler-configmap.yaml ({{ ... | toJson }}). Logging: - Structured logs (Info/Warn/Debug/Error with traceID/funcKey/sessionID fields) across all litescheduler paths. - Log-side snapshots fixed three latent data races exposed by reading pool/alloc fields after Unlock: handleAcquire cold-start instanceCount, handleRelease inUse/capacity, handleRetain newExpire. -race clean. Testing: - TDD across all tasks: failing test -> implementation -> green. - litescheduler package: -race clean (no data race, no deadlock). - Coverage: allocationID format/parse edge cases, status mapping, dispatcher concurrency/round-robin/unavailable exclusion, isFuncEnabled three-tier, ParseRequest trigger matrix, acquire/release/retain/batchRetain semantics, cold-start bounded wait + concurrent map-race guard, Process reverse lookup/owner check, registry event pool maintenance, metrics inc-wired, noopSender nil-hint no-panic. Verified with request da2190af-dace-489e-8fe3-b2e1cae8e365: - LiteScheduler correctly enters cold-start path, constructs ScaleHint, sends via noopSender (logged), and waits for instance via polling. - Instance creation handled by ReplicaScaler minInstance mechanism. - batchRetain chain works correctly with TTL refresh. - Known issue: release does not reach lite branch (frontend handles locally and discards lite-prefixed leaseId), causing InUse count leak. Fix requires frontend lease_manager changes (out of scope). Signed-off-by: For_YL <zhangtangwei@huawei.com> | 2 天前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 个月前 | ||
| 7 个月前 | ||
| 3 个月前 | ||
| 7 个月前 | ||
| 7 个月前 | ||
| 7 个月前 | ||
| 7 个月前 | ||
| 3 个月前 | ||
| 3 个月前 | ||
| 2 天前 |