함수 DiscardPendingChanges [SWS_PER_00365] Upstream: RS_PER_00002, RS_AP_00119, RS_AP_00120, RS_AP_00127, RS_AP_00128, RS_AP_00129, RS_AP_00135, RS_AP_00139, RS_AP_00159
ara::core::Result< void > DiscardPendingChanges () noexcept;
Removes all pending changes to this Key-Value Storage since the last call to SyncToStorage() or since this Key-Value Storage was opened using OpenKeyValueStorage(). DiscardPendingChanges may be delayed by an ongoing call from another thread to RemoveAll Keys, SyncToStorage, DiscardPendingChanges, SetValue, GetValue, GetCurrentValueSize, RemoveKey, RecoverKey, or ResetKey.
사용법 및 의미론
클래스 ara::per::KeyValueStorage([SWS_PER_00365])의 동기 멤버 함수 DiscardPendingChanges은 헤더 ara/per/key_value_storage.h을 통해 제공됩니다. 매개변수를 받지 않으며 ara::core::Result<void>를 반환합니다. 이 함수의 목적은 SyncToStorage의 마지막 호출 이후 또는 OpenKeyValueStorage()을 사용해 연 이후 발생한 Key-Value-Storage 인스턴스의 모든 보류 중인 변경사항을 취소하는 것입니다 [SWS_PER_00365].
상호 작용 및 트랜잭션 동작
SetValue [SWS_PER_00046], RemoveKey [SWS_PER_00047] 및 RemoveAllKeys [SWS_PER_00048]와 같은 쓰기 작업에는 트랜잭션 시맨틱이 적용됩니다. 해당 변경사항은 SyncToStorage을 호출해야 물리적 스토리지 미디어에 영구적으로 기록됩니다 [SWS_PER_00049]. DiscardPendingChanges을 통해 이러한 저장되지 않은 수정 사항이 롤백되므로 GetCurrentValueSize를 통한 조회 역시 이전의 트랜잭션 시작 상태를 다시 반영합니다 [SWS_PER_00554].
오류 처리 및 동시성
오류 발생 시 결과에는 정의된 롤백 시맨틱과 함께 제조업체별 오류 또는 PerErrc의 오류 코드가 포함됩니다 [SWS_PER_00365]:
PerErrc::kIllegalWriteAccess: 스토리지가 쓰기 금지되어 있거나 Write-Only-Once 구성에서 키가 이미 존재하는 경우.PerErrc::kPhysicalStorageFailure: 물리적 스토리지 미디어에 대한 액세스가 실패하는 경우.PerErrc::kIntegrityCorrupted,PerErrc::kValidationFailed,PerErrc::kEncryptionFailed또는PerErrc::kAuthenticationFailed: 무결성 손실, 유효성 검사 오류, 복호화 오류 또는 실패한 MAC 검증 시.
이 메서드는 noexcept으로 선언되어 있으며 예외로부터 안전(exception safe)하고 스레드 안전(thread-safe)합니다 [SWS_PER_00365]. 그러나 다른 스레드에서 병렬로 SyncToStorage, SetValue, RemoveKey, RemoveAllKeys, ResetKey 또는 RecoverKey의 호출이 활성 상태인 경우 실행이 지연될 수 있습니다 [SWS_PER_00365] [SWS_PER_00426] [SWS_PER_00427].
이 텍스트는 AI에 의해 생성되었으며 AUTOSAR 사양을 기반으로 큐레이팅되었습니다.
구현자 가이드 준비 중 (복잡도 I2)
| Header-Datei | #include "ara/per/key_value_storage.h" |
|---|---|
| Scope | class ara::per::KeyValueStorage |
| Exception-Sicherheit | exception safe |
| Thread-Sicherheit | thread-safe |
Rückgabewert
| Typ | Beschreibung |
|---|---|
| ara::core::Result< void > | A Result of void. In case of an error, it contains any of the errors defined below, or a vendor specific error. |
Fehler
| Fehlercode | Beschreibung |
|---|---|
| PerErrc::kIllegalWriteAccess | rollback_semantics Returned if the Key-Value Storage is configured as read- only, or if it is configured as write-only-once and the key already exists. |
| PerErrc::kPhysicalStorageFailure | rollback_semantics Returned if access to the physical storage fails. |
| PerErrc::kIntegrityCorrupted | rollback_semantics Returned if stored data cannot be read because the structural integrity is corrupted. |
| PerErrc::kValidationFailed | rollback_semantics Returned if the validity of stored data cannot be ensured. |
| PerErrc::kEncryptionFailed | rollback_semantics Returned if the decryption of stored data fails. |
| PerErrc::kAuthenticationFailed | rollback_semantics Returned if checking the MAC of stored data fails. |
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/SWS_PER_00365- Status
- valid/unmigrated
- Version
AUTOSAR/AP/record/SWS_PER_00365@rel:R25-11#10d56c75- Content hash
10d56c75- Source
- https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00365
Status: valid/unmigrated
Version: rel:R25-11#f3496212
Versionshistorie & Revisions (1 transition, 8 revision)
- Current State
valid/unmigrated- Reason
- mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
- Campaign
2026-08-13-status-backfill- Active Version
AUTOSAR/AP/record/SWS_PER_00365@rel:R25-11#f3496212
Recorded Revisions (8):
- R25-11
rel:R25-11#0793e9a52026-09-30 - R19-11
rel:R19-11#90dcd0d22026-10-14 - R20-11
rel:R20-11#306302ca2026-10-14 - R21-11
rel:R21-11#5bb9ceb52026-10-14 - R22-11
rel:R22-11#6374aaa62026-10-14 - R23-11
rel:R23-11#7a4bc2902026-10-14 - R24-11
rel:R24-11#fd18fb832026-10-14 - R25-11
rel:R25-11#f34962122026-10-14 active
Requirement Text as-of this release:
Curation Decisions:
Reachable Artifacts & Dependents:
| Date | Actor | Transition | Reason / Rationale | Campaign |
|---|---|---|---|---|
| 2026-08-13 | tool | none → valid/unmigrated | mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record | 2026-08-13-status-backfill |
gemini-3.8-flash-low· 2026-10-13 · 독일어 원문