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

Пауза убивает активные закачки #126

Closed
MonkAlex opened this issue Jan 8, 2019 · 0 comments · Fixed by #132
Closed

Пауза убивает активные закачки #126

MonkAlex opened this issue Jan 8, 2019 · 0 comments · Fixed by #132
Labels
area/core any issue related with core logic bug
Milestone

Comments

@MonkAlex
Copy link
Owner

MonkAlex commented Jan 8, 2019

Если во время закачки поставить на паузу, а потом возобновить, то помирают соединения с базой. Це странно, ибо используется Async контекст, т.е. на паузу должен реагировать корректно.

Возможно дело в том, что using криво работает с async-await конструкциями и соединение с БД может быть реально завершено к моменту снятия с паузы.

NHibernate.Exceptions.GenericADOException: could not execute query
[ select mangasetti0_.Id as id1_6_, mangasetti0_.Manga as manga2_6_, mangasetti0_.Folder as folder3_6_, mangasetti0_.MangaName as manganame4_6_, mangasetti0_.CompressManga as compressmanga5_6_, mangasetti0_.OnlyUpdate as onlyupdate6_6_, mangasetti0_.DefaultCompression as defaultcompression7_6_, mangasetti0_.MainUri as mainuri8_6_, mangasetti0_.FolderNamingStrategy as foldernamingstrategy9_6_, mangasetti0_.Login_id as login10_6_ from "MangaSetting" mangasetti0_ where mangasetti0_.Manga=@p0 ]
  Name:p1 - Value:495ffd4f-d37f-437f-870a-5c1c321d1b20
[SQL: select mangasetti0_.Id as id1_6_, mangasetti0_.Manga as manga2_6_, mangasetti0_.Folder as folder3_6_, mangasetti0_.MangaName as manganame4_6_, mangasetti0_.CompressManga as compressmanga5_6_, mangasetti0_.OnlyUpdate as onlyupdate6_6_, mangasetti0_.DefaultCompression as defaultcompression7_6_, mangasetti0_.MainUri as mainuri8_6_, mangasetti0_.FolderNamingStrategy as foldernamingstrategy9_6_, mangasetti0_.Login_id as login10_6_ from "MangaSetting" mangasetti0_ where mangasetti0_.Manga=@p0] ---> System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'SQLiteConnection'.
   at System.Data.SQLite.SQLiteConnection.CheckDisposed()
   at System.Data.SQLite.SQLiteDataReader.CheckClosed()
   at System.Data.SQLite.SQLiteDataReader.Read()
   at NHibernate.Driver.NHybridDataReader.Read()
   at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies, IResultTransformer forcedResultTransformer)
   at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies, IResultTransformer forcedResultTransformer)
   at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters, IResultTransformer forcedResultTransformer)
   --- End of inner exception stack trace ---
   at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters, IResultTransformer forcedResultTransformer)
   at NHibernate.Loader.Loader.ListIgnoreQueryCache(ISessionImplementor session, QueryParameters queryParameters)
   at NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl.List(ISessionImplementor session, QueryParameters queryParameters)
   at NHibernate.Engine.Query.HQLQueryPlan.PerformList(QueryParameters queryParameters, ISessionImplementor session, IList results)
   at NHibernate.Impl.SessionImpl.List(IQueryExpression queryExpression, QueryParameters queryParameters, IList results, Object filterConnection)
   at NHibernate.Impl.AbstractSessionImpl.List(IQueryExpression queryExpression, QueryParameters parameters)
   at NHibernate.Impl.AbstractQueryImpl2.List()
   at NHibernate.Linq.DefaultQueryProvider.ExecuteQuery(NhLinqExpression nhLinqExpression, IQuery query, NhLinqExpression nhQuery)
   at NHibernate.Linq.DefaultQueryProvider.Execute(Expression expression)
   at NHibernate.Linq.DefaultQueryProvider.Execute[TResult](Expression expression)
   at System.Linq.Queryable.Single[TSource](IQueryable`1 source, Expression`1 predicate)
   at MangaReader.Core.BasePlugin.GetSettings()
   at Hentaichan.Mangachan.Parser.GetClient()
   at Hentaichan.Mangachan.Parser.UpdatePages(Chapter chapter)

В целом, критичность низкая, повторное выполнение обновления скачает всё, в базе ничего не должно запороть.

@MonkAlex MonkAlex added this to the Deffered milestone Jan 8, 2019
@MonkAlex MonkAlex added the bug label Jan 8, 2019
@MonkAlex MonkAlex modified the milestones: Deffered, 1.48 Feb 2, 2019
@MonkAlex MonkAlex added the area/core any issue related with core logic label Feb 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core any issue related with core logic bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant