Skip to content

Commit 7595ade

Browse files
update
1 parent 51656f2 commit 7595ade

File tree

2 files changed

+3
-32
lines changed

2 files changed

+3
-32
lines changed

slo/playground/configs/ydb.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
p_q_config:
1+
pqconfig:
22
require_credentials_in_new_protocol: false
3-
3+
44
actor_system_config:
55
cpu_count: 1
66
node_type: STORAGE

slo/src/TopicService/SloTopicContext.cs

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -11,43 +11,14 @@ namespace TopicService;
1111

1212
public class SloTopicContext : ISloContext
1313
{
14-
private const string PathTopic = "/Root/pixcc-slice-db/slo-topic";
14+
private const string PathTopic = "/Root/testdb/slo-topic";
1515
private const string ConsumerName = "Consumer";
1616
private const int PartitionSize = 10;
1717

1818
private static readonly ILogger Logger = ISloContext.Factory.CreateLogger<SloTopicContext>();
1919

2020
public async Task Create(CreateConfig config)
2121
{
22-
// var splitEndpoint = config.Endpoint.Split("://");
23-
// var useTls = splitEndpoint[0] switch
24-
// {
25-
// "grpc" => false,
26-
// "grpcs" => true,
27-
// _ => throw new ArgumentException("Don't support schema: " + splitEndpoint[0])
28-
// };
29-
//
30-
// var host = splitEndpoint[1].Split(":")[0];
31-
// var port = splitEndpoint[1].Split(":")[1];
32-
//
33-
// await using var connection = new YdbConnection(new YdbConnectionStringBuilder
34-
// {
35-
// UseTls = useTls, Host = host, Port = int.Parse(port), Database = config.Db,
36-
// LoggerFactory = ISloContext.Factory
37-
// });
38-
// await connection.OpenAsync();
39-
//
40-
// await new YdbCommand(connection)
41-
// {
42-
// CommandText = @"
43-
// CREATE TOPIC `/Root/testdb/slo-topic` (
44-
// CONSUMER Consumer
45-
// ) WITH (min_active_partitions = 10);
46-
//
47-
// CREATE USER user PASSWORD password;
48-
// "
49-
// }.ExecuteNonQueryAsync();
50-
5122
var topicClient = new TopicClient(await Driver.CreateInitialized(
5223
new DriverConfig(config.Endpoint, config.Db), ISloContext.Factory)
5324
);

0 commit comments

Comments
 (0)