Skip to content

Instantly share code, notes, and snippets.

View polRk's full-sized avatar
👋
YDB NodeJS Maintainer

Vladislav Polyakov polRk

👋
YDB NodeJS Maintainer
View GitHub Profile
@polRk
polRk / results-summary.md
Created May 27, 2026 02:56
ydb_fdw compat-prog results.db summary (companion to ydb-platform/ydb-pg-extension#230)

results.db summary

Runs

id started channel mode pg_version fdw_commit
1 2026-05-26T14:59:38Z nightly pg_regress 16.9 unknown
2 2026-05-26T15:04:11Z nightly sqlglot 16.9 unknown
3 2026-05-26T15:40:56Z nightly ef 16.9 9c3af7c-local
4 2026-05-26T15:42:06Z nightly oss 16.9 9c3af7c-local
@polRk
polRk / AGGREGATE.txt
Created May 25, 2026 15:39
ydb_fdw empirical readiness harness — schemas of 15 OSS projects fed through the FDW
# CROSS-PROJECT ERROR COUNTS
project errors top categories
calcom 1268 OTHER=622, TYPE_UNKNOWN=178, NO_FOREIGN_KEY=138, NO_ADD_CONSTRAINT=120
discourse 1236 OTHER=698, NO_ADD_CONSTRAINT=301, TYPE_UNKNOWN=71, ALTER_COL_NOT_REDIRECTED=64
lemmy 914 OTHER=819, ALTER_COL_NOT_REDIRECTED=78, NO_ADD_CONSTRAINT=12, NO_EXTENSION=2
hydra 639 OTHER=423, ALTER_COL_NOT_REDIRECTED=125, NO_ADD_CONSTRAINT=82, NO_EXTENSION=4
drone 442 OTHER=279, ALTER_COL_NOT_REDIRECTED=102, NO_ADD_CONSTRAINT=15, NO_PARTIAL_INDEX=14
mattermost 430 OTHER=193, ALTER_COL_NOT_REDIRECTED=146, OBJECT_EXISTS=53, INDEX_TYPE_NOT_SUPPORTED:GIN=11
concourse 285 OTHER=156, NO_ADD_CONSTRAINT=57, NO_FOREIGN_KEY=37, ALTER_COL_NOT_REDIRECTED=23
@polRk
polRk / coordination.ts
Created March 3, 2026 12:34
YDB Coordination Service Design
// Уровень 2: Session
await using session = await client.openSession(path, options?)
// [asyncDispose] → session.close()
// Semaphore — создаётся на сессии, не disposable сам по себе
let semaphore = session.semaphore(name, { limit })
semaphore.update(data, signal?)
semaphore.delete(options?, signal?)
semaphore.describe(options?, signal?)
export const data = {"meta":{"pull":"2033","commit":"a49f06688800c6aa36d2b132700aa3946e772f87","repo_url":"https://github.com/ydb-platform/ydb-go-sdk","repo_full_name":"ydb-platform/ydb-go-sdk","run_id":"22396931549","run_url":"https://github.com/ydb-platform/ydb-go-sdk/actions/runs/22396931549","workload":"native-query","workload_current_ref":"slo-v2","workload_baseline_ref":"master@c12c431","start_time":"2026-02-25T12:42:52.935Z","start_epoch_ms":1772023372935,"finish_time":"2026-02-25T12:52:53.532Z","finish_epoch_ms":1772023973532,"duration_ms":600597},"alerts":[{"alertname":"ChaosFaultActive","epoch_ms":1772023417935,"duration_ms":0,"labels":{"__name__":"ALERTS","event_type":"01-graceful-stop.sh","fault":"graceful-stop","job":"chaos-monkey","node":"ydb-database-2","severity":"info"}},{"alertname":"ChaosFaultActive","epoch_ms":1772023492935,"duration_ms":0,"labels":{"__name__":"ALERTS","event_type":"02-instant-restart.sh","fault":"instant-restart","job":"chaos-monkey","node":"ydb-database-3","severity":"in
@polRk
polRk / index.js
Last active June 2, 2025 13:48
Yandex Cloud Functions + YDB Serverless
import { MetadataCredentialsProvider } from '@ydbjs/auth/metadata'
import { Driver } from '@ydbjs/core'
import { query } from '@ydbjs/query'
export async function handler() {
const provider = new MetadataCredentialsProvider({})
const driver = new Driver(
'grpcs://ydb.serverless.yandexcloud.net:2135/ru-central1/b1gh9qpnleo6mg7ov83v/etndqej6hqst8mklliso',
{
@polRk
polRk / index.ts
Last active January 23, 2025 05:15
YDB Butch Insert without data helpers
import {
Column,
Driver,
getCredentialsFromEnv,
getLogger,
Logger,
Session,
TableDescription,
Types,
Ydb,
@polRk
polRk / example.js
Created January 22, 2025 20:20
YDB Table Client Query Stats Example
import {Driver, ExecuteQuerySettings, getCredentialsFromEnv, Ydb} from 'ydb-sdk';
const authService = getCredentialsFromEnv();
console.info('Driver initializing...');
const driver = new Driver({
connectionString: process.env['YDB_CONNECTION_STRING'],
authService,
});
const timeout = 10000;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import type { APIGatewayProxyEvent, APIGatewayProxyResult } from 'aws-lambda'
import { readFileSync } from 'node:fs'
import { resolve } from 'node:path'
import { render } from './entry-server'
import { getFormState, initYDB, NotFoundError } from './ydb'
import { configureStore } from '@reduxjs/toolkit'
import { AppMode, appReceived, formReceived, reducer } from './store'
initYDB().catch(console.error)
Fuck Around and Find Out License
Copyright (c) 2020 Mark Vasilkov (https://github.com/mvasilkov)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: