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

NGram index dropped & created on every startup - 7.0.0 - beta 4 #2914

Closed
arildboifot opened this issue Jan 18, 2024 · 4 comments
Closed

NGram index dropped & created on every startup - 7.0.0 - beta 4 #2914

arildboifot opened this issue Jan 18, 2024 · 4 comments
Assignees
Milestone

Comments

@arildboifot
Copy link

arildboifot commented Jan 18, 2024

A small repro using Marten 7.0.0 beta 4

using Marten;
using Microsoft.Extensions.Hosting;

var host = Host.CreateDefaultBuilder()
   .ConfigureServices((ctx, services) =>
    {
        services.AddMarten(opts =>
        {
            opts.Connection("xxx");
            opts.Schema.For<NGramDoc>().NgramIndex(x => x.NGramString);
        })
       .ApplyAllDatabaseChangesOnStartup()
       .UseLightweightSessions();
    })
   .Build();

await host.StartAsync();

public class NGramDoc
{
    public Guid Id { get; set; }
    public string NGramString { get; set; } = "";
}
@arildboifot arildboifot changed the title NGram index dropped & created on every startup NGram index dropped & created on every startup - 7.0.0 - beta 4 Jan 18, 2024
@jeremydmiller jeremydmiller added this to the 7.0.0 milestone Jan 25, 2024
@jeremydmiller jeremydmiller self-assigned this Jan 25, 2024
@jeremydmiller
Copy link
Member

This might have been fixed by other changes, but "works on my box"

@arildboifot
Copy link
Author

arildboifot commented Feb 5, 2024

Using the same setup as earlier I still see this issue on beta 5.

drop index if exists public.mt_doc_ngramdoc_idx_ngram_ngramstring;
CREATE INDEX mt_doc_ngramdoc_idx_ngram_ngramstring ON public.mt_doc_ngramdoc USING gin (public.mt_grams_vector( data ->> 'NGramString'));

@mysticmind mysticmind self-assigned this Feb 6, 2024
@mysticmind mysticmind reopened this Feb 6, 2024
@mysticmind
Copy link
Member

@arildboifot Thanks for reporting that the issue still persists. We will have a look at it.

@jeremydmiller I will have a look at this.

@jeremydmiller
Copy link
Member

Trying it again this evening, and "it works on my box" again. I can't reproduce this at all with V7. There is some Weasel changes coming that were part of fixing #2983, maybe those changes will help whatever is happening here. What I am seeing in that other issue is that some other configuration of PostgreSQL makes yet more changes to the DDL that we weren't yet accounting for in our comparison.

But for right now, with no workable reproduction, this has to be closed because nothing is actionable.

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

No branches or pull requests

3 participants