27 মার্চ, 2025 থেকে, আমরা AOSP তৈরি করতে এবং অবদান রাখতে aosp-main এর পরিবর্তে android-latest-release ব্যবহার করার পরামর্শ দিচ্ছি। আরও তথ্যের জন্য, AOSP-তে পরিবর্তনগুলি দেখুন।
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
অ্যান্ড্রয়েড 9 SQLiteDatabase- এর একটি বিশেষ মোড প্রবর্তন করে যার নাম কম্প্যাটিবিলিটি রাইট-এহেড লগিং (WAL) যা একটি ডাটাবেসকে journal_mode=WAL ব্যবহার করতে দেয় এবং প্রতি ডাটাবেস প্রতি সর্বাধিক একটি সংযোগ রাখার আচরণ সংরক্ষণ করে।
কম্প্যাটিবিলিটি WAL ডিফল্টরূপে একটি অ্যাপের ডাটাবেসের জন্য সক্ষম করা থাকে যদি না অ্যাপটিতে যেটি থাকে:
SQLiteDatabase.OpenParams.setJournalMode(String mode) কল করে স্পষ্টভাবে অনুরোধ করা জার্নাল মোড
WAL জার্নাল মোড সক্রিয় করা কর্মক্ষমতা এবং লেখার পরিমাণ হ্রাস একটি উল্লেখযোগ্য উন্নতি হতে পারে। উদাহরণস্বরূপ, একটি ext4 ফাইল সিস্টেমে, WAL লেখার গতিতে 4x উন্নতি করতে পারে।
সামঞ্জস্যতা WAL ডিফল্টরূপে সক্রিয় করা হয় এবং কোনো অতিরিক্ত বাস্তবায়নের প্রয়োজন হয় না।
আপনি কনফিগারেশনের জন্য সামঞ্জস্যতা WAL অক্ষম করতে চাইতে পারেন যেখানে WAL জার্নাল মোড প্রথাগত রোলব্যাক জার্নাল মোডগুলির তুলনায় একটি কর্মক্ষমতা সুবিধা প্রদান করে না। উদাহরণস্বরূপ, একটি F2FS ফাইল সিস্টেমে, যদিও SQLite পারমাণবিক লেখাকে সমর্থন করে এবং DELETE জার্নালের কার্যকারিতা WAL-এর মতোই, তবে WAL লেখার পরিমাণ 10% থেকে 15% বৃদ্ধি করতে পারে।
বৈধতা
সামঞ্জস্যপূর্ণ WAL মোড যাচাই করতে, CtsDatabaseTestCases মডিউল থেকে CTS পরীক্ষা চালান। CTS পরীক্ষাগুলি প্রত্যাশিত আচরণ যাচাই করবে যখন সামঞ্জস্যতা WAL সক্ষম হবে৷
এই পৃষ্ঠার কন্টেন্ট ও কোডের নমুনাগুলি Content License-এ বর্ণিত লাইসেন্সের অধীনস্থ। Java এবং OpenJDK হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-29 UTC-তে শেষবার আপডেট করা হয়েছে।
[[["সহজে বোঝা যায়","easyToUnderstand","thumb-up"],["আমার সমস্যার সমাধান হয়েছে","solvedMyProblem","thumb-up"],["অন্যান্য","otherUp","thumb-up"]],[["এতে আমার প্রয়োজনীয় তথ্য নেই","missingTheInformationINeed","thumb-down"],["খুব জটিল / অনেক ধাপ","tooComplicatedTooManySteps","thumb-down"],["পুরনো","outOfDate","thumb-down"],["অনুবাদ সংক্রান্ত সমস্যা","translationIssue","thumb-down"],["নমুনা / কোড সংক্রান্ত সমস্যা","samplesCodeIssue","thumb-down"],["অন্যান্য","otherDown","thumb-down"]],["2025-07-29 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# Compatibility write-ahead logging for apps\n\nAndroid 9 introduces a special mode of\n[SQLiteDatabase](https://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html)\ncalled Compatibility write-ahead logging (WAL) that allows a database to use\n`journal_mode=WAL` while preserving the behavior of keeping a maximum of one\nconnection per database.\n\nCompatibility WAL is enabled for an app's database by default unless the\napp has either:\n\n1. Opted-in or out of write-ahead logging by calling [`SQLiteDatabase.enableWriteAheadLogging`](https://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html#enableWriteAheadLogging()) or [`disableWriteAheadLogging`](https://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html#disableWriteAheadLogging())\n2. Explicitly requested journal mode by calling `SQLiteDatabase.OpenParams.setJournalMode(String mode)`\n\nEnabling the WAL journal mode can lead to a significant improvement in\nperformance and reduction in the amount of writes. For example, on an ext4\nfile system, WAL can lead to a 4x improvement in write speed.\n\nCompatibility WAL is enabled by default and doesn't require any additional\nimplementation.\n| **Note:** For apps using [Room](https://developer.android.com/topic/libraries/architecture/room), full write-ahead logging mode (not Compatibility WAL) is enabled by default. This applies to devices running API 16 and higher and aren't categorized as a [low memory device](https://developer.android.com/reference/android/app/ActivityManager.html#isLowRamDevice()). For more information, see [`RoomDatabase.JournalMode AUTOMATIC`](https://developer.android.com/reference/androidx/room/RoomDatabase.JournalMode#AUTOMATIC).\n\nDisable Compatibility WAL\n-------------------------\n\nTo disable the Compatibility WAL mode, overlay the\n[`db_compatibility_wal_supported`](https://android.googlesource.com/platform/frameworks/base/+/5bd43ad2e7e4e1ee2c31d920ba4b148bbdf74d11/core/res/res/values/config.xml#1692)\nconfig resource.\n\nFor example: \n\n \u003cbool name=\"db_compatibility_wal_supported\"\u003efalse\u003c/bool\u003e\n\nYou may want to disable Compatibility WAL for configurations where the WAL\njournal mode doesn't provide a performance advantage over traditional rollback\njournal modes. For example, on a F2FS file system, although SQLite supports\natomic writes and the DELETE journal performance is similar to WAL, WAL can\nincrease the amount of writes by 10% to 15%.\n\nValidation\n----------\n\nTo validate the Compatibility WAL mode, run\n[CTS tests](https://android.googlesource.com/platform/cts/+/android16-release/tests/tests/database)\nfrom the CtsDatabaseTestCases module. CTS tests will verify the expected\nbehavior when Compatibility WAL is enabled.\n| **Note:** CTS tests pass when the Compatibility WAL mode is disabled."]]