Skip to content

Commit

Permalink
Revert "Gjør Recreate for å deploye større migrering (legger på indeks)"
Browse files Browse the repository at this point in the history
This reverts commit 93ba82b.
  • Loading branch information
geiralund committed Jan 15, 2025
1 parent 93ba82b commit 82b9628
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
5 changes: 4 additions & 1 deletion .nais/nais.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ spec:
image: "{{ image }}"
port: 8080
strategy:
type: Recreate # Bruk kun Recreate når vi deployer store/ukompatible migreringer
type: RollingUpdate # Bruk kun Recreate når vi deployer store/ukompatible migreringer
rollingUpdate:
maxSurge: 100%
maxUnavailable: 99%
liveness:
path: /isalive
readiness:
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package no.nav.dagpenger.behandling.mediator.repository

import io.kotest.matchers.collections.shouldBeEmpty
import io.kotest.matchers.collections.shouldContainExactly
import io.kotest.matchers.collections.shouldNotBeEmpty
import io.kotest.matchers.longs.shouldBeLessThan
import io.kotest.matchers.nulls.shouldBeNull
import io.kotest.matchers.nulls.shouldNotBeNull
Expand Down Expand Up @@ -198,20 +197,14 @@ class OpplysningerRepositoryPostgresTest {
fun `Klarer å lagre store mengder opplysninger effektivt`() {
withMigratedDb {
val repo = OpplysningerRepositoryPostgres()
val vaktmester = VaktmesterPostgresRepo()
val fakta = (1..5000).map { Faktum(desimal, it.toDouble()) }
val fakta = (1..50000).map { Faktum(desimal, it.toDouble()) }
val opplysninger = Opplysninger(fakta)

val tidBrukt = measureTimeMillis { repo.lagreOpplysninger(opplysninger) }
tidBrukt shouldBeLessThan 5555

val fraDb = repo.hentOpplysninger(opplysninger.id)
fraDb.finnAlle().size shouldBe fakta.size
fraDb.aktiveOpplysninger.forEach { it.fjern() }
repo.lagreOpplysninger(fraDb)

val tid = measureTimeMillis { vaktmester.slettOpplysninger().shouldNotBeEmpty() }
println("Brukte $tid ms på å slette opplysninger")
}
}

Expand Down

0 comments on commit 82b9628

Please sign in to comment.