66
77 "github.com/ydb-platform/ydb-go-sdk/v3/internal/db"
88 builder "github.com/ydb-platform/ydb-go-sdk/v3/internal/scheme"
9+ "github.com/ydb-platform/ydb-go-sdk/v3/retry"
910 "github.com/ydb-platform/ydb-go-sdk/v3/scheme"
1011)
1112
@@ -27,7 +28,9 @@ func (s *lazyScheme) ModifyPermissions(
2728 opts ... scheme.PermissionsOption ,
2829) (err error ) {
2930 s .init ()
30- return s .client .ModifyPermissions (ctx , path , opts ... )
31+ return retry .Retry (ctx , false , func (ctx context.Context ) (err error ) {
32+ return s .client .ModifyPermissions (ctx , path , opts ... )
33+ })
3134}
3235
3336func (s * lazyScheme ) Close (ctx context.Context ) error {
@@ -52,20 +55,32 @@ func (s *lazyScheme) init() {
5255
5356func (s * lazyScheme ) DescribePath (ctx context.Context , path string ) (e scheme.Entry , err error ) {
5457 s .init ()
55- return s .client .DescribePath (ctx , path )
58+ err = retry .Retry (ctx , true , func (ctx context.Context ) (err error ) {
59+ e , err = s .client .DescribePath (ctx , path )
60+ return err
61+ })
62+ return e , err
5663}
5764
5865func (s * lazyScheme ) MakeDirectory (ctx context.Context , path string ) (err error ) {
5966 s .init ()
60- return s .client .MakeDirectory (ctx , path )
67+ return retry .Retry (ctx , false , func (ctx context.Context ) (err error ) {
68+ return s .client .MakeDirectory (ctx , path )
69+ })
6170}
6271
6372func (s * lazyScheme ) ListDirectory (ctx context.Context , path string ) (d scheme.Directory , err error ) {
6473 s .init ()
65- return s .client .ListDirectory (ctx , path )
74+ err = retry .Retry (ctx , true , func (ctx context.Context ) (err error ) {
75+ d , err = s .client .ListDirectory (ctx , path )
76+ return err
77+ })
78+ return d , err
6679}
6780
6881func (s * lazyScheme ) RemoveDirectory (ctx context.Context , path string ) (err error ) {
6982 s .init ()
70- return s .client .RemoveDirectory (ctx , path )
83+ return retry .Retry (ctx , false , func (ctx context.Context ) (err error ) {
84+ return s .client .RemoveDirectory (ctx , path )
85+ })
7186}
0 commit comments