Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[server] Add request based store properties endpoint to server #1374

Merged
merged 25 commits into from
Jan 7, 2025

Conversation

pthirun
Copy link
Contributor

@pthirun pthirun commented Dec 6, 2024

[server] Add request based store properties endpoint to server

Add endpoint to server to allow DVC to retrieve store metadata, bypassing the store based metadata retrieval. This change will not impact any behavior of the DVC during deployment. It will only add the option for the DVC to use the metadata via the endpoint. A future PR will make changes to the DVC to utilize this endpoint.

Endpoint Details

Method: GET
Path: /store_properties/{store_name}

Example Response

{
  "storeMetaValue" : {
    "timestamp" : 1734462120342,
    "storeProperties" : {
      "name" : "venice-store_12d358cea7fe2_d3dd310e",
      "owner" : "store-owner_12d358cea8c94_2ee9007c",
      "createdTime" : 1734462116477,
      "currentVersion" : 1,
      "partitionCount" : 0,
      "lowWatermark" : 0,
      "enableWrites" : true,
      "enableReads" : true,
      "storageQuotaInByte" : 21474836480,
      "persistenceType" : 2,
      "routingStrategy" : 0,
      "readStrategy" : 0,
      "offlinePushStrategy" : 0,
      "largestUsedVersionNumber" : 1,
      "readQuotaInCU" : 1800,
      "hybridConfig" : null,
      "views" : { },
      "accessControlled" : true,
      "compressionStrategy" : 0,
      "clientDecompressionEnabled" : true,
      "chunkingEnabled" : false,
      "rmdChunkingEnabled" : false,
      "batchGetLimit" : -1,
      "numVersionsToPreserve" : 0,
      "incrementalPushEnabled" : false,
      "separateRealTimeTopicEnabled" : false,
      "migrating" : false,
      "writeComputationEnabled" : false,
      "readComputationEnabled" : true,
      "bootstrapToOnlineTimeoutInHours" : 24,
      "leaderFollowerModelEnabled" : false,
      "nativeReplicationEnabled" : false,
      "replicationMetadataVersionID" : 0,
      "pushStreamSourceAddress" : "",
      "backupStrategy" : 1,
      "schemaAutoRegisteFromPushJobEnabled" : false,
      "latestSuperSetValueSchemaId" : -1,
      "hybridStoreDiskQuotaEnabled" : false,
      "storeMetadataSystemStoreEnabled" : false,
      "etlConfig" : {
        "etledUserProxyAccount" : "",
        "regularVersionETLEnabled" : false,
        "futureVersionETLEnabled" : false
      },
      "partitionerConfig" : {
        "partitionerClass" : "com.linkedin.venice.partitioner.DefaultVenicePartitioner",
        "partitionerParams" : { },
        "amplificationFactor" : 1
      },
      "incrementalPushPolicy" : 0,
      "latestVersionPromoteToCurrentTimestamp" : 1734462118195,
      "backupVersionRetentionMs" : -1,
      "replicationFactor" : 2,
      "migrationDuplicateStore" : false,
      "nativeReplicationSourceFabric" : "",
      "daVinciPushStatusStoreEnabled" : false,
      "storeMetaSystemStoreEnabled" : true,
      "activeActiveReplicationEnabled" : false,
      "applyTargetVersionFilterForIncPush" : false,
      "minCompactionLagSeconds" : -1,
      "maxCompactionLagSeconds" : -1,
      "maxRecordSizeBytes" : -1,
      "maxNearlineRecordSizeBytes" : -1,
      "unusedSchemaDeletionEnabled" : false,
      "versions" : [ {
        "storeName" : "venice-store_12d358cea7fe2_d3dd310e",
        "number" : 1,
        "createdTime" : 1734462116527,
        "status" : 3,
        "pushJobId" : "guid_id_40ea0577-5b8c-409f-96db-7955ad18d22b",
        "compressionStrategy" : 0,
        "leaderFollowerModelEnabled" : true,
        "nativeReplicationEnabled" : false,
        "pushStreamSourceAddress" : "",
        "bufferReplayEnabledForHybrid" : false,
        "chunkingEnabled" : false,
        "rmdChunkingEnabled" : false,
        "pushType" : 0,
        "partitionCount" : 3,
        "partitionerConfig" : {
          "partitionerClass" : "com.linkedin.venice.partitioner.DefaultVenicePartitioner",
          "partitionerParams" : { },
          "amplificationFactor" : 1
        },
        "incrementalPushPolicy" : 0,
        "replicationFactor" : 2,
        "nativeReplicationSourceFabric" : "",
        "incrementalPushEnabled" : false,
        "separateRealTimeTopicEnabled" : false,
        "blobTransferEnabled" : false,
        "useVersionLevelIncrementalPushEnabled" : true,
        "hybridConfig" : null,
        "useVersionLevelHybridConfig" : true,
        "activeActiveReplicationEnabled" : false,
        "timestampMetadataVersionId" : 1,
        "dataRecoveryConfig" : null,
        "deferVersionSwap" : false,
        "views" : { },
        "repushSourceVersion" : -1,
        "targetSwapRegion" : "",
        "targetSwapRegionWaitTime" : 60,
        "isDaVinciHeartBeatReported" : false
      } ],
      "systemStores" : {
        "venice_system_store_meta_store" : {
          "largestUsedVersionNumber" : 1,
          "currentVersion" : 1,
          "latestVersionPromoteToCurrentTimestamp" : 1734462120154,
          "versions" : [ {
            "storeName" : "venice_system_store_meta_store_venice-store_12d358cea7fe2_d3dd310e",
            "number" : 1,
            "createdTime" : 1734462118361,
            "status" : 3,
            "pushJobId" : "test_bootstrap_meta_system_store",
            "compressionStrategy" : 0,
            "leaderFollowerModelEnabled" : true,
            "nativeReplicationEnabled" : false,
            "pushStreamSourceAddress" : "",
            "bufferReplayEnabledForHybrid" : false,
            "chunkingEnabled" : false,
            "rmdChunkingEnabled" : false,
            "pushType" : 0,
            "partitionCount" : 1,
            "partitionerConfig" : {
              "partitionerClass" : "com.linkedin.venice.partitioner.DefaultVenicePartitioner",
              "partitionerParams" : { },
              "amplificationFactor" : 1
            },
            "incrementalPushPolicy" : 0,
            "replicationFactor" : 2,
            "nativeReplicationSourceFabric" : "",
            "incrementalPushEnabled" : false,
            "separateRealTimeTopicEnabled" : false,
            "blobTransferEnabled" : false,
            "useVersionLevelIncrementalPushEnabled" : true,
            "hybridConfig" : {
              "rewindTimeInSeconds" : 86400,
              "offsetLagThresholdToGoOnline" : 1,
              "producerTimestampLagThresholdToGoOnlineInSeconds" : -1,
              "dataReplicationPolicy" : 0,
              "bufferReplayPolicy" : 0,
              "realTimeTopicName" : ""
            },
            "useVersionLevelHybridConfig" : true,
            "activeActiveReplicationEnabled" : false,
            "timestampMetadataVersionId" : 1,
            "dataRecoveryConfig" : null,
            "deferVersionSwap" : false,
            "views" : { },
            "repushSourceVersion" : -1,
            "targetSwapRegion" : "",
            "targetSwapRegionWaitTime" : 60,
            "isDaVinciHeartBeatReported" : false
          } ]
        }
      },
      "storageNodeReadQuotaEnabled" : true,
      "blobTransferEnabled" : false,
      "nearlineProducerCompressionEnabled" : true,
      "nearlineProducerCountPerWriter" : 1,
      "targetSwapRegion" : "",
      "targetSwapRegionWaitTime" : 60,
      "isDaVinciHeartBeatReported" : false
    },
    "storeKeySchemas" : {
      "keySchemaMap" : {
        "1" : "\"string\""
      }
    },
    "storeValueSchemas" : {
      "valueSchemaMap" : {
        "1" : "{\"type\":\"record\",\"name\":\"TestValueSchema\",\"namespace\":\"com.linkedin.venice.fastclient.schema\",\"fields\":[{\"name\":\"int_field\",\"type\":\"int\"}]}"
      }
    },
    "storeValueSchema" : null,
    "storeReplicaStatuses" : null,
    "storeValueSchemaIdsWrittenPerStoreVersion" : [ -1 ],
    "storeClusterConfig" : null
  },
  "helixGroupInfo" : {
    "https://localhost:56592" : 0,
    "https://localhost:56614" : 0
  },
  "routingInfo" : {
    "0" : [ "https://localhost:56592", "https://localhost:56614" ],
    "1" : [ "https://localhost:56592", "https://localhost:56614" ],
    "2" : [ "https://localhost:56592", "https://localhost:56614" ]
  }
}

How was this PR tested?

Unit and Integration test included in PR.

Does this PR introduce any user-facing changes?

  • No. You can skip the rest of this section.
  • Yes. Make sure to explain your proposed changes and call out the behavior change.

@pthirun pthirun requested a review from xunyin8 December 6, 2024 21:08
@FelixGV
Copy link
Contributor

FelixGV commented Dec 7, 2024

No links to internal docs on the open source repo please.

@pthirun, @xunyin8, can we add a page to the open source wiki describing system stores?

@pthirun pthirun force-pushed the main branch 3 times, most recently from 15d22e6 to 3b2064f Compare December 10, 2024 19:55
Copy link
Contributor

@xunyin8 xunyin8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants