Datastore 쿼리의 데이터 일관성
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
데이터 일관성 레벨
Datastore 쿼리는 두 가지 일관성 레벨 중 하나로 결과를 제공합니다.
Eventual Consistency를 가진 쿼리에서는 결과를 수집하는 데 사용되는 색인에 액세스할 때도 eventual consistency가 적용됩니다. 결과적으로 이러한 쿼리는 원래의 기준에 더 이상 일치하지 않는 항목을 반환하는 경우가 있는 반면 strong consistency를 가진 쿼리는 항상 트랜잭션에서 일관적입니다.
Datastore 쿼리 데이터 일관성
쿼리는 각각의 특성에 따라 다양한 레벨의 일관성을 보장하는 결과를 반환합니다.
- 상위 쿼리(항목 그룹 내 쿼리)는 기본적으로 strong consistency를 갖지만 Datastore 읽기 정책을 설정하여 eventual consistency를 갖도록 구성할 수 있습니다(아래 참조).
- 상위 쿼리가 아닌 쿼리는 항상 eventual consistency를 가집니다.
키를 사용하여 항목을 가져오는 '키별 조회'라는 방식은 강력한 일관성을 갖습니다.
다음 단계
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-04-15(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-04-15(UTC)"],[[["This API supports first-generation runtimes and is relevant when upgrading to corresponding second-generation runtimes, with a migration guide available for those updating to App Engine Go 1.12+."],["Datastore queries have two consistency levels: strongly consistent queries, which provide the freshest results but may take longer, and eventually consistent queries, which are faster but may return stale results."],["Ancestor queries are strongly consistent by default but can be made eventually consistent, whereas non-ancestor queries are always eventually consistent."],["Fetching an entity by key is a strongly consistent operation."],["Further learning resources are available on specifying query returns, restrictions, cursors, and the basic syntax of Datastore queries."]]],[]]