Upgrade from 1.x to 2.0.1 with out projections (Issues)

Hello guys,

As we all know that we have the “$stream-created-implicit” event in our 1.x version and we don’t have this meta data in 2.0.x any more. I am trying to get rid of the meta data, basically by rewriting the event-store instead of dealing with it within the code at the time we re-hydrate the aggregate.

First of all I would like to see what you guys think about cleaning the whole event-store by going through these streams and skip the “$stream-created” meta data event and move all these events to a new event-store.

Secondly is it OK to delete the log file folder within the event-store? I have noticed that while deleting the log file folder it recreates the log folder every time the db gets attached to the singlenode.exe.

While in the process of working on this tool to clean the event store after the upgrade from 1.x to 2.0.1, I have noticed that the admin user account is not getting migrated over and also I cannot see any projections running under the “Projections” tab even though I have selected the option “Enable All Projection”

Thank you all for your valuable comments and blogs and keeping it live.

Beno M

Replies inline

Hello guys,

As we all know that we have the "$stream-created-implicit " event in our
1.x version and we don’t have this meta data in 2.0.x any more. I am trying to get rid of the meta data, basically by rewriting the event-store instead of dealing with it within the code at the time we re-hydrate the aggregate.

First of all I would like to see what you guys think about cleaning the whole event-store by going through these streams and skip the “$stream-created” meta data event and move all these events to a new event-store.

I’d read $all from the original, filter what you don’t want then write to a new one.

Secondly is it OK to delete the log file folder within the event-store? I have noticed that while deleting the log file folder it recreates the log folder every time the db gets attached to the singlenode.exe.

Yup, it will create logs by default. Safe to delete. If you don’t want the logs or you want rolling etc, edit nlog.config appropriately.

While in the process of working on this tool to clean the event store after the upgrade from 1.x to 2.0.1, I have noticed that the admin user account is not getting migrated over and also I cannot see any projections running under the “Projections” tab
even though I have selected the option “Enable All Projection”

Very important: disable projections in v1, run the upgrade tool, enable projections in v2. There were no users in v1 so they’re not there to migrate. When you load with v2 they’ll get created.

James

James,

Thank you for your quick response, but here is the problem after I filter out all my events by skipping the “$stream-created” event into a new eventstore db and when I attach it to the eventstore.exe that by the way we run that as a windows service, I get the following error in the log file. I cannot enable the projections after that

PID:08760:001 2013.12.20 20:33:24.901 INFO ProgramBase`1 ]

ES VERSION: 2.0.1.0 (master/549d96219418572625b2f68d46ec809d9e86f7df, Thu, 1 Aug 2013 18:26:54 +0100)

OS: Windows (Microsoft Windows NT 6.2.9200.0)

RUNTIME: .NET 4.0.30319.18051 (64-bit)

GC: 3 GENERATIONS

LOGS: C:\Projects\Elements\src\TOPAZ.WebApp\App_Data\EventStoreDb\Elements-logs

SHOW HELP: False ()

SHOW VERSION: False ()

LOGS DIR: ()

CONFIGS: ()

DEFINES: ()

IP: 192.168.15.142 (–ip from command line)

TCP PORT: 1113 (–tcp-port from command line)

SECURE TCP PORT: 0 ()

HTTP PORT: 2113 (–http-port from command line)

STATS PERIOD SEC: 30 ()

CACHED CHUNKS: 0 (–cached-chunks from command line)

CHUNKS CACHE SIZE: 536871424 ()

MIN FLUSH DELAY MS: 2 ()

DB PATH: …\App_Data\EventStoreDb\Elements (–db from command line)

SKIP DB VERIFY: False ()

RUN PROJECTIONS: System ()

PROJECTION THREADS: 3 ()

WORKER THREADS: 5 ()

HTTP PREFIXES: ()

ENABLE TRUSTED AUTH: False ()

CERTIFICATE STORE: ()

CERTIFICATE NAME: ()

CERTIFICATE FILE: ()

CERTIFICATE PASSWORD: ()

PREPARE TIMEOUT MS: 2000 ()

COMMIT TIMEOUT MS: 2000 ()

FORCE: False ()

[PID:08760:001 2013.12.20 20:33:24.986 INFO ProgramBase`1 ]

DATABASE: C:\Projects\Elements\src\TOPAZ.WebApp\App_Data\EventStoreDb\Elements

WRITER CHECKPOINT: 7218176 (0x6E2400)

CHASER CHECKPOINT: 7218176 (0x6E2400)

EPOCH CHECKPOINT: 7217750 (0x6E2256)

TRUNCATE CHECKPOINT: -1 (0xFFFFFFFFFFFFFFFF)

[PID:08760:001 2013.12.20 20:33:25.196 TRACE MessageHierarchy ] MessageHierarchy initialization took 00:00:00.1073371.

[PID:08760:001 2013.12.20 20:33:25.919 INFO MiniWeb ] Starting MiniWeb for /web/es/js/projections ==> C:\Projects\Elements\EventStore\singlenode-web\js\projections

[PID:08760:001 2013.12.20 20:33:25.919 INFO MiniWeb ] Starting MiniWeb for /web/es/js/projections/v8/Prelude ==> C:\Projects\Elements\EventStore\Prelude

[PID:08760:001 2013.12.20 20:33:25.919 INFO MiniWeb ] Starting MiniWeb for /web/es/js/projections/resources ==> C:\Projects\Elements\EventStore\web-resources\js

[PID:08760:001 2013.12.20 20:33:25.927 TRACE MiniWeb ] Binding MiniWeb to /web/es/js/projections/{*remaining_path}

[PID:08760:001 2013.12.20 20:33:25.927 TRACE MiniWeb ] Binding MiniWeb to /web/es/js/projections/v8/Prelude/{*remaining_path}

[PID:08760:001 2013.12.20 20:33:25.927 TRACE MiniWeb ] Binding MiniWeb to /web/es/js/projections/resources/{*remaining_path}

[PID:08760:001 2013.12.20 20:33:25.927 INFO MiniWeb ] Starting MiniWeb for /web ==> C:\Projects\Elements\EventStore\singlenode-web

[PID:08760:001 2013.12.20 20:33:25.927 INFO MiniWeb ] Starting MiniWeb for /web/es ==> C:\Projects\Elements\EventStore\es-common-web

[PID:08760:001 2013.12.20 20:33:25.927 TRACE MiniWeb ] Binding MiniWeb to /web/{*remaining_path}

[PID:08760:001 2013.12.20 20:33:25.927 TRACE MiniWeb ] Binding MiniWeb to /web/es/{*remaining_path}

[PID:08760:001 2013.12.20 20:33:25.927 INFO MiniWeb ] Starting MiniWeb for /web/users ==> C:\Projects\Elements\EventStore\Users\web

[PID:08760:001 2013.12.20 20:33:25.927 TRACE MiniWeb ] Binding MiniWeb to /web/users/{*remaining_path}

[PID:08760:012 2013.12.20 20:33:25.969 INFO SingleVNodeControlle] ========== [192.168.15.142:2113] SYSTEM INIT…

[PID:08760:012 2013.12.20 20:33:26.010 INFO TcpServerListener ] Starting Normal TCP listening on TCP endpoint: 192.168.15.142:1113.

[PID:08760:010 2013.12.20 20:33:26.056 INFO ReadIndex ] TableIndex initialization…

[PID:08760:010 2013.12.20 20:33:26.095 INFO ReadIndex ] ReadIndex building…

[PID:08760:012 2013.12.20 20:33:26.098 INFO HttpAsyncServer ] Starting HTTP server on [http://192.168.15.142:2113/]…

[PID:08760:012 2013.12.20 20:33:26.098 INFO HttpAsyncServer ] HTTP server is up and listening on [http://192.168.15.142:2113/]

[PID:08760:012 2013.12.20 20:33:26.134 TRACE InMemoryBus ] SLOW BUS MSG [MainBus]: SystemInit - 83ms. Handler: HttpService.

[PID:08760:012 2013.12.20 20:33:26.162 TRACE QueuedHandlerMRES ] SLOW QUEUE MSG [MainQueue]: SystemInit - 190ms. Q: 0/3.

[PID:08760:010 2013.12.20 20:33:26.571 DEBUG ReadIndex ] ReadIndex Rebuilding Done: total processed 17629 records, time elapsed: 00:00:00.4733233.

[PID:08760:010 2013.12.20 20:33:26.599 TRACE QueuedHandlerMRES ] SLOW QUEUE MSG [StorageWriterQueue]: SystemInit - 621ms. Q: 0/0.

[PID:08760:013 2013.12.20 20:33:26.599 TRACE QueuedHandlerMRES ] SLOW QUEUE MSG [MonitoringQueue]: SystemInit - 625ms. Q: 0/0.

[PID:08760:012 2013.12.20 20:33:26.599 INFO SingleVNodeControlle] ========== [192.168.15.142:2113] SYSTEM START…

[PID:08760:012 2013.12.20 20:33:26.614 INFO SingleVNodeControlle] ========== [192.168.15.142:2113] PRE-MASTER STATE, WAITING FOR CHASER TO CATCH UP…

[PID:08760:012 2013.12.20 20:33:26.614 INFO SingleVNodeControlle] ========== [192.168.15.142:2113] IS WORKING!!! SPARTA!!!

[PID:08760:014 2013.12.20 20:33:26.780 TRACE ProjectionManager ] Projection manager did not find any projection configuration records in the $projections-$stream_by_category stream. Projection stays in CREATING state

[PID:08760:014 2013.12.20 20:33:26.780 TRACE ProjectionManager ] Projection manager did not find any projection configuration records in the $projections-$users stream. Projection stays in CREATING state

[PID:08760:014 2013.12.20 20:33:26.780 TRACE ProjectionManager ] Projection manager did not find any projection configuration records in the $projections-$by_event_type stream. Projection stays in CREATING state

[PID:08760:014 2013.12.20 20:33:26.780 TRACE ProjectionManager ] Projection manager did not find any projection configuration records in the $projections-$streams stream. Projection stays in CREATING state

[PID:08760:014 2013.12.20 20:33:26.780 TRACE ProjectionManager ] Projection manager did not find any projection configuration records in the $projections-$by_category stream. Projection stays in CREATING state

[PID:08760:010 2013.12.20 20:33:26.806 DEBUG EpochManager ] === Writing E5@7218176:{8060c0d2-0525-47de-ad85-bb3bc524dae3} (previous epoch at 7217750).

[PID:08760:010 2013.12.20 20:33:26.816 DEBUG EpochManager ] === Update Last Epoch E5@7218176:{8060c0d2-0525-47de-ad85-bb3bc524dae3} (previous epoch at 7217750).

[PID:08760:013 2013.12.20 20:33:26.891 TRACE MonitoringService ] Created stats stream ‘$stats-192.168.15.142:2113’, code = WrongExpectedVersion

[PID:08760:013 2013.12.20 20:33:35.508 TRACE QueuedHandlerMRES ] SLOW QUEUE MSG [MonitoringQueue]: GetFreshStats - 144ms. Q: 0/0.