Skip to content

Commit

Permalink
Rename storage-rocksdb to partition-store
Browse files Browse the repository at this point in the history
  • Loading branch information
AhmedSoliman committed Apr 30, 2024
1 parent 65a20aa commit 7bf3d22
Show file tree
Hide file tree
Showing 50 changed files with 89 additions and 90 deletions.
91 changes: 45 additions & 46 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ restate-network = { path = "crates/network" }
restate-node = { path = "crates/node" }
restate-node-protocol = { path = "crates/node-protocol" }
restate-node-services = { path = "crates/node-services" }
restate-partition-store = { path = "crates/partition-store" }
restate-queue = { path = "crates/queue" }
restate-rocksdb = { path = "crates/rocksdb" }
restate-schema = { path = "crates/schema" }
Expand All @@ -60,7 +61,6 @@ restate-service-protocol = { path = "crates/service-protocol" }
restate-storage-api = { path = "crates/storage-api" }
restate-storage-query-datafusion = { path = "crates/storage-query-datafusion" }
restate-storage-query-postgres = { path = "crates/storage-query-postgres" }
restate-storage-rocksdb = { path = "crates/storage-rocksdb" }
restate-test-util = { path = "crates/test-util" }
restate-timer = { path = "crates/timer" }
restate-timer-queue = { path = "crates/timer-queue" }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "restate-storage-rocksdb"
name = "restate-partition-store"
version.workspace = true
authors.workspace = true
edition.workspace = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ use std::ops::RangeInclusive;

use criterion::{criterion_group, criterion_main, Criterion};
use restate_core::TaskCenterBuilder;
use restate_partition_store::{OpenMode, PartitionStore, PartitionStoreManager};
use restate_rocksdb::RocksDbManager;
use restate_storage_api::deduplication_table::{
DedupSequenceNumber, DeduplicationTable, ProducerId,
};
use restate_storage_api::Transaction;
use restate_storage_rocksdb::{OpenMode, PartitionStore, PartitionStoreManager};
use restate_types::arc_util::Constant;
use restate_types::config::{CommonOptions, WorkerOptions};
use restate_types::identifiers::PartitionKey;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ pub trait TableKey: Sized + std::fmt::Debug + Send + 'static {
/// This macro expands to:
/// ```ignore
/// use bytes::{Buf, BufMut, Bytes};
/// use restate_storage_rocksdb::TableKind;
/// use restate_partition_store::TableKind;
/// #[derive(Debug, Eq, PartialEq)]
/// pub struct FooBarKey {
/// pub foo: Option<u32>,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

use crate::{assert_stream_eq, mock_state_mutation};
use once_cell::sync::Lazy;
use restate_partition_store::PartitionStore;
use restate_storage_api::inbox_table::{InboxEntry, InboxTable, SequenceNumberInboxEntry};
use restate_storage_api::Transaction;
use restate_storage_rocksdb::PartitionStore;
use restate_types::identifiers::{InvocationId, ServiceId};

static INBOX_ENTRIES: Lazy<Vec<SequenceNumberInboxEntry>> = Lazy::new(|| {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
use bytes::Bytes;
use futures::Stream;
use restate_core::TaskCenterBuilder;
use restate_partition_store::{OpenMode, PartitionStore, PartitionStoreManager};
use restate_rocksdb::RocksDbManager;
use restate_storage_api::StorageError;
use restate_storage_rocksdb::{OpenMode, PartitionStore, PartitionStoreManager};
use restate_types::arc_util::Constant;
use restate_types::config::{CommonOptions, WorkerOptions};
use restate_types::identifiers::{InvocationId, PartitionKey, ServiceId};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ use super::assert_stream_eq;

use bytestring::ByteString;
use once_cell::sync::Lazy;
use restate_partition_store::PartitionStore;
use restate_storage_api::invocation_status_table::{
InFlightInvocationMetadata, InvocationStatus, InvocationStatusTable, JournalMetadata,
StatusTimestamps,
};
use restate_storage_rocksdb::PartitionStore;
use restate_types::identifiers::InvocationId;
use restate_types::invocation::{
HandlerType, InvocationTarget, ServiceInvocationSpanContext, Source,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ use bytes::Bytes;
use bytestring::ByteString;
use futures_util::StreamExt;
use once_cell::sync::Lazy;
use restate_partition_store::PartitionStore;
use restate_storage_api::journal_table::{JournalEntry, JournalTable};
use restate_storage_api::Transaction;
use restate_storage_rocksdb::PartitionStore;
use restate_types::identifiers::{InvocationId, InvocationUuid};
use restate_types::invocation::{InvocationTarget, ServiceInvocationSpanContext};
use restate_types::journal::enriched::{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
// by the Apache License, Version 2.0.

use crate::mock_random_service_invocation;
use restate_partition_store::PartitionStore;
use restate_storage_api::outbox_table::{OutboxMessage, OutboxTable};
use restate_storage_api::Transaction;
use restate_storage_rocksdb::PartitionStore;

fn mock_outbox_message() -> OutboxMessage {
OutboxMessage::ServiceInvocation(mock_random_service_invocation())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

use crate::{assert_stream_eq, storage_test_environment};
use bytes::Bytes;
use restate_partition_store::PartitionStore;
use restate_storage_api::state_table::{ReadOnlyStateTable, StateTable};
use restate_storage_api::Transaction;
use restate_storage_rocksdb::PartitionStore;
use restate_types::identifiers::ServiceId;

async fn populate_data<T: StateTable>(table: &mut T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

use crate::mock_service_invocation;
use futures_util::StreamExt;
use restate_partition_store::PartitionStore;
use restate_storage_api::timer_table::{Timer, TimerKey, TimerTable};
use restate_storage_api::Transaction;
use restate_storage_rocksdb::PartitionStore;
use restate_types::identifiers::{InvocationUuid, ServiceId};
use restate_types::invocation::ServiceInvocation;
use std::pin::pin;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0.

use restate_partition_store::PartitionStore;
use restate_storage_api::service_status_table::{VirtualObjectStatus, VirtualObjectStatusTable};
use restate_storage_rocksdb::PartitionStore;
use restate_types::identifiers::{InvocationId, InvocationUuid, ServiceId};

const FIXTURE_INVOCATION: InvocationUuid =
Expand Down
6 changes: 3 additions & 3 deletions crates/storage-query-datafusion/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ default = []
options_schema = ["dep:schemars"]

[dependencies]
restate-storage-rocksdb = { workspace = true }
restate-types = { workspace = true }
restate-invoker-api = { workspace = true }
restate-partition-store = { workspace = true }
restate-schema-api = { workspace = true, features = ["deployment"] }
restate-service-protocol = { workspace = true, features = ["codec"] }
restate-storage-api = { workspace = true }
restate-invoker-api = { workspace = true }
restate-types = { workspace = true }

ahash = { workspace = true } # Required to due a yanked version used by datafusion
async-trait = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/storage-query-datafusion/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ use datafusion::physical_plan::SendableRecordBatchStream;
use datafusion::prelude::{SessionConfig, SessionContext};

use restate_invoker_api::StatusHandle;
use restate_partition_store::PartitionStore;
use restate_schema_api::deployment::DeploymentResolver;
use restate_schema_api::service::ServiceMetadataResolver;
use restate_storage_rocksdb::PartitionStore;
use restate_types::config::QueryEngineOptions;

use crate::{analyzer, physical_optimizer};
Expand Down
2 changes: 1 addition & 1 deletion crates/storage-query-datafusion/src/inbox/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ use datafusion::physical_plan::stream::RecordBatchReceiverStream;
use datafusion::physical_plan::SendableRecordBatchStream;
pub use datafusion_expr::UserDefinedLogicalNode;
use futures::{Stream, StreamExt};
use restate_partition_store::PartitionStore;
use restate_storage_api::inbox_table::{InboxTable, SequenceNumberInboxEntry};
use restate_storage_api::StorageError;
use restate_storage_rocksdb::PartitionStore;
use restate_types::identifiers::PartitionKey;
use tokio::sync::mpsc::Sender;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

use crate::invocation_status::schema::{InvocationStatusBuilder, InvocationStatusRowBuilder};
use crate::table_util::format_using;
use restate_partition_store::invocation_status_table::OwnedInvocationStatusRow;
use restate_storage_api::invocation_status_table::{
InFlightInvocationMetadata, InvocationStatus, JournalMetadata, StatusTimestamps,
};
use restate_storage_rocksdb::invocation_status_table::OwnedInvocationStatusRow;
use restate_types::identifiers::InvocationId;
use restate_types::invocation::{ServiceType, Source, TraceId};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ use crate::invocation_status::schema::InvocationStatusBuilder;
use datafusion::physical_plan::stream::RecordBatchReceiverStream;
use datafusion::physical_plan::SendableRecordBatchStream;
pub use datafusion_expr::UserDefinedLogicalNode;
use restate_storage_rocksdb::invocation_status_table::OwnedInvocationStatusRow;
use restate_storage_rocksdb::PartitionStore;
use restate_partition_store::invocation_status_table::OwnedInvocationStatusRow;
use restate_partition_store::PartitionStore;
use restate_types::identifiers::PartitionKey;
use tokio::sync::mpsc::Sender;

Expand Down
2 changes: 1 addition & 1 deletion crates/storage-query-datafusion/src/journal/row.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ use crate::journal::schema::JournalBuilder;

use restate_service_protocol::codec::ProtobufRawEntryCodec;

use restate_partition_store::journal_table::OwnedJournalRow;
use restate_storage_api::journal_table::JournalEntry;
use restate_storage_rocksdb::journal_table::OwnedJournalRow;
use restate_types::identifiers::WithPartitionKey;
use restate_types::journal::enriched::{EnrichedEntryHeader, EnrichedRawEntry};

Expand Down
4 changes: 2 additions & 2 deletions crates/storage-query-datafusion/src/journal/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ use crate::journal::schema::JournalBuilder;
use datafusion::physical_plan::stream::RecordBatchReceiverStream;
use datafusion::physical_plan::SendableRecordBatchStream;
pub use datafusion_expr::UserDefinedLogicalNode;
use restate_storage_rocksdb::journal_table::OwnedJournalRow;
use restate_storage_rocksdb::PartitionStore;
use restate_partition_store::journal_table::OwnedJournalRow;
use restate_partition_store::PartitionStore;
use restate_types::identifiers::PartitionKey;
use tokio::sync::mpsc::Sender;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

use crate::keyed_service_status::schema::KeyedServiceStatusBuilder;
use crate::table_util::format_using;
use restate_partition_store::service_status_table::OwnedVirtualObjectStatusRow;
use restate_storage_api::service_status_table::VirtualObjectStatus;
use restate_storage_rocksdb::service_status_table::OwnedVirtualObjectStatusRow;

#[inline]
pub(crate) fn append_virtual_object_status_row(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ use crate::keyed_service_status::schema::KeyedServiceStatusBuilder;
use datafusion::physical_plan::stream::RecordBatchReceiverStream;
use datafusion::physical_plan::SendableRecordBatchStream;
pub use datafusion_expr::UserDefinedLogicalNode;
use restate_storage_rocksdb::service_status_table::OwnedVirtualObjectStatusRow;
use restate_storage_rocksdb::PartitionStore;
use restate_partition_store::service_status_table::OwnedVirtualObjectStatusRow;
use restate_partition_store::PartitionStore;
use restate_types::identifiers::PartitionKey;
use tokio::sync::mpsc::Sender;

Expand Down
2 changes: 1 addition & 1 deletion crates/storage-query-datafusion/src/mocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ use googletest::matcher::{Matcher, MatcherResult};
use restate_core::task_center;
use restate_invoker_api::status_handle::mocks::MockStatusHandle;
use restate_invoker_api::StatusHandle;
use restate_partition_store::{OpenMode, PartitionStore, PartitionStoreManager};
use restate_rocksdb::RocksDbManager;
use restate_schema_api::deployment::mocks::MockDeploymentMetadataRegistry;
use restate_schema_api::deployment::{Deployment, DeploymentResolver};
use restate_schema_api::service::mocks::MockServiceMetadataResolver;
use restate_schema_api::service::{ServiceMetadata, ServiceMetadataResolver};
use restate_storage_rocksdb::{OpenMode, PartitionStore, PartitionStoreManager};
use restate_types::arc_util::Constant;
use restate_types::config::{CommonOptions, QueryEngineOptions, WorkerOptions};
use restate_types::identifiers::{DeploymentId, PartitionKey, ServiceRevision};
Expand Down
Loading

0 comments on commit 7bf3d22

Please sign in to comment.