Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
images
00000000_template.md
20150720_schema_gossip.md
20150729_bounds_generation.md
20150729_range_replica_naming.md
20150729_replica_tombstone.md
20150729_segmented_storage.md
20150731_local_intent_resolution.md
20150806_gateway_batch.md
20150810_select_from_index.md
20150810_sql_privileges.md
20150811_replica_batch.md
20150819_stateless_replica_relocation.md
20150820_store_pool.md
20150820_structured_configs.md
20151009_table_descriptor_lease.md
20151014_online_schema_change.md
20151111_txn_gc.md
20151207_grpc.md
20151213_dismantle_multiraft.md
20151214_sql_column_families.md
20160201_remove_sql_cli.md
20160203_typing.md
20160210_raft_consistency_checker.md
20160210_range_leases.md
20160218_freeze.md
20160331_index_hints.md
20160418_dump.md
20160420_proposer_evaluated_kv.md
20160421_distributed_sql.md
20160425_drain_modes.md
20160426_fk.md
20160426_upsert.md
20160426_version_upgrades.md
20160503_rebalancing_v2.md
20160524_time_travel.md
20160525_type_annotations.md
20160624_sql_interleaved_tables.md
20160706_expressive_zone_config.md
20160720_backup_restore.md
20160721_information_schema.md
20160730_streaming_snapshots.md
20160824_quiesce_ranges.md
20160830_views.md
20160901_time_series_culling.md
20161006_time_conversion.md
20161024_cluster_upgrade_tool.md
20161026_leaseholder_rebalancing.md
20161215_join_filters.md
20170117_enterprise.md
20170124_sql_parallelization.md
20170125_leaseholder_locality.md
20170215_system_jobs.md
20170314_sql_split_syntax.md
20170317_settings_table.md
20170318_init_command.md
20170319_certificate_rotation.md
20170424_postgres_syntax.md
20170505_monitoring_queries_and_sessions.md
20170517_algebraic_data_types.md
20170518_array_encoding.md
20170522_external_storage.md
20170601_pause_resume_cancel.md
20170601_raft_sstable_sideloading.md
20170602_distsql_limit.md
20170602_rebalancing_for_1_1.md
20170605_dedicated_raft_storage.md
20170608_decommission.md
20170608_query_cancellation.md
20170613_range_feeds_storage_primitive.md
20170620_streaming_results.md
20170628_web_session_login.md
20170701_jobs_monitoring.md
20170719_distsql_buffering_router.md
20170815_version_migration.md
20170908_sql_optimizer_statistics.md
20170921_sql_partitioning.md
20170925_jsonb_scope.md
20170926_sql_aux_data.md
20171005_jsonb_encoding.md
20171011_adding_sql_syntax.md
20171020_inverted_indexes.md
20171024_select_for_update.md
20171025_interleaved_table_joins.md
20171025_scrub_sql_consistency_check_command.md
20171102_sql_sequences.md
20171120_scrub_index_and_physical_implementation.md
20171201_cascade.md
20171206_single_use_common_table_expressions.md
20171213_sql_query_planning.md
20171214_computed_columns.md
20171220_encryption_at_rest.md
20171220_sql_role_based_access_control.md
20180219_pg_virtual_namespacing.md
20180324_parallel_commit.md
20180330_range_merges.md
20180411_alter_column_type.md
20180411_finalize_cluster_upgrade_automatically.md
20180413_alter_primary_key.md
20180501_change_data_capture.md
20180603_follower_reads.md
20180919_cascading_zone_configs.md
20181204_copysets.md
20181209_lazy_txn_record_creation.md
20181227_follower_reads_implementation.md
20190318_error_handling.md
20190731_cluster_name.md
20191009_gc_protected_timestamps.md
20191014_halloween.md
PROTOTYPING.md
README.md

README.md

About This Directory

This directory contains RFCs (design documents) that describe proposed major changes to CockroachDB.

The Why of RFCs

An RFC provides a high-level description of a major change or enhancement to Cockroach. The high-level description allows a reviewer to critique and poke holes in a design without getting lost in the particulars of code.

An RFC is a form of communication aimed at both spreading and gathering knowledge, though it is not the sole means of accomplishing either task. Prototypes, tech notes, github issues, comments in code, commit messages and in-person discussions are valid alternatives depending on the situation.

At its best, an RFC clearly and concisely describes the high-level architecture of a project giving confidence to all involved. At its worst, an RFC focuses on unimportant details, fosters discussion that stymies progress, or demoralizes the author with the complexity of their undertaking.

The When and How of RFCs

When to write an RFC is nuanced and there are no firm rules. General guidance is to write an RFC before embarking on a significant or complex project that will be spread over multiple pull requests (PRs), and when multiple alternatives need to be considered and there is no obvious best approach. A project involving multiple people is a good signal an RFC is warranted. (Similarly, a project worthy of an RFC often requires multiple engineers worth of effort). Note that this guidance is intentionally vague. Many complex projects spread over multiple PRs do not require an RFC, though they do require adequate communication and discussion.1

It is encouraged to develop a prototype concurrently with writing the RFC. One of the significant benefits of an RFC is that it forces bigger picture thinking which reviewers can then disect. In contrast, a prototype forces the details to be considered, shedding light on the unknown unknowns and helping to ensure that the RFC focuses on the important design considerations.

An RFC should be a high-level description which does not require formal correctness. There is utility in conciseness. Do not overspecify the details in the RFC as doing so can bury the reviewer in minutiae.1 If you've never written an RFC before consider partnering with a more experienced engineer for guidance and to help shepherd your RFC through the process.

RFC Process

  1. Every RFC should have a dedicated reviewer familiar with the RFC's subject area.

  2. Copy 00000000_template.md to a new file and fill in the details. Commit this version in your own fork of the repository or a branch.

  3. Submit a pull request (PR) to add your new file to the main repository. Each RFC should get its own pull request; do not combine RFCs with other files.

    Note: you can send a PR before the RFC is complete in order to solicit input about what to write in the RFC. In this case, include the term "[WIP]" (work in progress) in the PR title and use the label do-not-merge, until you are confident the RFC is complete and can be reviewed.

  4. Go through the PR review, iterating on the RFC to answer questions and concerns from the reviewer(s). The duration of this process should be related to the complexity of the project. If you or the reviewers seem to be at an impasse, consider in-person discussions or a prototype. There is no minimum time required to leave an RFC open for review. There is also no prohibition about halting or reversing work on an accepted RFC if a problem is discovered during implementation.

    Reviewers should be conscious of their own limitations and ask for other engineers to look at specific areas if necessary.

  5. Once discussion has settled and the RFC has received an LGTM from the reviewer(s):

    • change the Status field of the document to in-progress;
    • rename the RFC document to prefix it with the current date (YYYYMMDD_);
    • update the RFC PR field;
    • and merge the PR.
  6. Once the changes in the RFC have been implemented and merged, change the Status field of the document from in-progress to completed. If subsequent developments render an RFC obsolete, change its status to obsolete. When you mark a RFC as obsolete, ensure that its text references the other RFCs or PRs that make it obsolete.

Footnotes

1: An exception to the general guidance on when an RFC is warranted is that anything more than trivial changes and extensions to SQL syntax require discussion within an RFC. Additionally, SQL syntax is a detail that an RFC should mention.

You can’t perform that action at this time.